Find limit of recursion: Difference between revisions
Content added Content deleted
(Add Uxntal) |
(Added various BASIC dialects (Chipmunk Basic, MSX Basic, Minimal BASIC and Quite BASIC)) |
||
Line 524: | Line 524: | ||
ext = Recursion(0)</syntaxhighlight> |
ext = Recursion(0)</syntaxhighlight> |
||
==={{header|Chipmunk Basic}}=== |
|||
{{works with|Chipmunk Basic|3.6.4}} |
|||
<syntaxhighlight lang="vbnet">10 sub recursion(n) |
|||
20 print n |
|||
30 recursion(1 + n) |
|||
40 end sub |
|||
50 recursion(0) |
|||
60 end</syntaxhighlight> |
|||
==={{header|FreeBASIC}}=== |
==={{header|FreeBASIC}}=== |
||
Line 552: | Line 561: | ||
33 |
33 |
||
Out of memory in 20.</pre> |
Out of memory in 20.</pre> |
||
==={{header|Minimal BASIC}}=== |
|||
<syntaxhighlight lang="qbasic">10 LET N = 0 |
|||
20 LET N = N + 1 |
|||
30 PRINT N |
|||
40 GOSUB 20 |
|||
50 END</syntaxhighlight> |
|||
{{out}} |
|||
<pre> 257 |
|||
40: error: stack overflow</pre> |
|||
==={{header|MSX Basic}}=== |
|||
{{works with|MSX BASIC|any}} |
|||
The [[#GW_BASIC|GW BASIC]] solution works without any changes.> |
|||
==={{header|QBasic}}=== |
==={{header|QBasic}}=== |
||
Line 562: | Line 585: | ||
ext = Recursion(0)</syntaxhighlight> |
ext = Recursion(0)</syntaxhighlight> |
||
==={{header|Quite BASIC}}=== |
|||
<syntaxhighlight lang="qbasic">10 LET N = 0 |
|||
20 LET N = N + 1 |
|||
30 PRINT N |
|||
40 GOSUB 20</syntaxhighlight> |
|||
==={{header|Sinclair ZX81 BASIC}}=== |
==={{header|Sinclair ZX81 BASIC}}=== |