Jump to content

Find limit of recursion: Difference between revisions

Added various BASIC dialects (Chipmunk Basic, MSX Basic, Minimal BASIC and Quite BASIC)
(Add Uxntal)
(Added various BASIC dialects (Chipmunk Basic, MSX Basic, Minimal BASIC and Quite BASIC))
Line 524:
 
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}}===
Line 552 ⟶ 561:
33
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}}===
Line 562 ⟶ 585:
 
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}}===
2,133

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.