Find limit of recursion: Difference between revisions

Content added Content deleted
(→‎{{header|TXR}}: Drop @(do ...). Larger depth due to reduced stack usage (smaller unwind frames on Linux).)
Line 1,950: Line 1,950:
If you want to investigate further, choose "debug" in this window. Do not use the debugger "fullStack" command unless you are certain that the stack is not very deep. (Trying to show the full stack will definitely use up all remaining memory if the low-space problem is caused by an infinite recursion!).
If you want to investigate further, choose "debug" in this window. Do not use the debugger "fullStack" command unless you are certain that the stack is not very deep. (Trying to show the full stack will definitely use up all remaining memory if the low-space problem is caused by an infinite recursion!).


Other dialects raise an exception:
<lang smalltalk>
down := [ counter := counter + 1. down value ].
[
down value
] on: RecursionError do:[
'depth is ' print. counter printNL
].</lang>


=={{header|Tcl}}==
=={{header|Tcl}}==