Find limit of recursion: Difference between revisions

m
global whitespace
m (→‎{{header|Ruby}}: whitespace)
m (global whitespace)
Line 346:
 
here we see that the function call stack size is 262067.
 
 
=={{header|Oz}}==
Line 394 ⟶ 393:
 
=={{header|PowerShell}}==
 
Both of these examples will throw an exception when the recursion depth is exceeded, however, the exception cannot be trapped in the script.
The exception thrown on a Windows 2008 x64 system is
Line 427 ⟶ 425:
The recursion limit is primarily determined by the stack size. The stack size can be changed when compiling a program by specifying the new size using '/stack:NewSize' in the linker file.
 
'''===Procedural===
 
In addition to the stack size the recursion limit for procedures is further limited by the procedure's parameters and local variables which are also stored on the same stack.
Line 438 ⟶ 436:
Stack overflow after 86317 recursions on x86 Vista.
 
'''===Classic way===
<lang PureBasic>rec:
PrintN(str(n))
Line 542 ⟶ 540:
Got to depth 999999
</pre>
 
 
=={{header|UNIX Shell}}==
Line 564 ⟶ 561:
 
The Bash reference manual says <cite>No limit is placed on the number of recursive calls</cite>, nonetheless a segmentation fault occurs at 13777 (Bash v3.2.19 on 32bit GNU/Linux)
 
 
=={{header|VBScript}}==
 
Haven't figured out how to see the depth. And this depth is that of calling the O/S rather than calling within.
 
Anonymous user