Wolfram Language & System 10.4 (2016)|Legacy Documentation
This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)
gives the current limit on the number of levels of recursion that the Wolfram Language can use.
- $RecursionLimit=n sets the limit on the number of recursion levels that the Wolfram Language can use to be n.
- $RecursionLimit=Infinity removes any limit on the number of recursion levels.
- $RecursionLimit gives the maximum length of the stack returned by Stack.
- Each time the evaluation of a function requires the nested evaluation of the same or another function, one recursion level is used up.
- On most computers, each level of recursion uses a certain amount of stack space. $RecursionLimit allows you to control the amount of stack space that the Wolfram Language can use from within the Wolfram Language. On some computer systems, your whole Wolfram Language session may crash if you allow it to use more stack space than the computer system allows.
- MemoryInUse and related functions do not count stack space.
Introduced in 1988