Find limit of recursion: Difference between revisions

→‎{{header|Forth}}: + ENVIRONMENT? call
(→‎{{header|Forth}}: + ENVIRONMENT? call)
Line 428:
 
test \ Default gforth: Recursion limit at depth 3817</lang>
 
Or you can just ask the system:
 
<lang forth>s" return-stack-cells" environment? ( 0 | potential-depth-of-return-stack -1 )</lang>
 
Full TCO is problematic, but a properly tail-recursive call is easy to add to any Forth. For example, in SwiftForth:
Anonymous user