Find limit of recursion: Difference between revisions
Content added Content deleted
(→{{header|AWK}}: Add nawk to comment.) |
No edit summary |
||
Line 680: | Line 680: | ||
Sample output (IE6): |
Sample output (IE6): |
||
<pre>Recursion depth on this system is 2552.</pre> |
<pre>Recursion depth on this system is 2552.</pre> |
||
=={{header|Liberty BASIC}}== |
|||
Checks for the case of gosub & for proper subroutine. |
|||
<lang lb> |
|||
'subroutine recursion limit- end up on 475000 |
|||
call test 1 |
|||
sub test n |
|||
if n mod 1000 = 0 then locate 1,1: print n |
|||
call test n+1 |
|||
end sub |
|||
</lang> |
|||
<lang lb> |
|||
'gosub recursion limit- end up on 5767000 |
|||
[test] |
|||
n = n+1 |
|||
if n mod 1000 = 0 then locate 1,1: print n |
|||
gosub [test] |
|||
</lang> |
|||
=={{header|Logo}}== |
=={{header|Logo}}== |