setMaxRecursionDepth: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Created page with "{{MacroFunction |name=setMaxRecusionDepth |version=1.4.0 |description Returns the current amount of recursive calls that are used. |usage= <source lang="mtmacro" line> setMax...")
 
No edit summary
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{MacroFunction
{{MacroFunction
|name=setMaxRecusionDepth
|name=setMaxRecursionDepth
|version=1.4.0
|version=1.4.0.2
|description
|description=
Returns the current amount of recursive calls that are used.
Returns the current amount of recursive calls that are used.


|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
setMaxRecusionDepth(depth)
setMaxRecursionDepth(depth)
</source>
</syntaxhighlight>
Where  
Where  
* ''depth'' is the new maximum allowed recursive calls. Note that the depth can never be lower then the default depth, which is 150, setting it lower will result in a depth of 150. Setting this value higher is obviously at your own risk as this has a serious impact on the stack.
* ''depth'' is the new maximum allowed recursive calls. Note that the depth can never be lower then the default depth, which is 150, setting it lower will result in a depth of 150. Setting this value higher is obviously at your own risk as this has a serious impact on the stack. Note that this settings lasts only for the current session.  


|example=
|example=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: setMaxRecusionDepth(200)]
[h: setMaxRecursionDepth(200)]
</source>
</syntaxhighlight>


|also=
|also=
{{func|getRecursionDepth}},
{{func|getRecursionDepth}},
{{func|getMaxRecusionDepth}}.
{{func|getMaxRecursionDepth}}.




}}
}}
[[Category:Loop and Recursion limits]]
[[Category:Loop and Recursion limits]]

Latest revision as of 20:49, 14 March 2023

setMaxRecursionDepth() Function

Introduced in version 1.4.0.2
Returns the current amount of recursive calls that are used.

Usage

setMaxRecursionDepth(depth)

Where

  • depth is the new maximum allowed recursive calls. Note that the depth can never be lower then the default depth, which is 150, setting it lower will result in a depth of 150. Setting this value higher is obviously at your own risk as this has a serious impact on the stack. Note that this settings lasts only for the current session.

Example

[h: setMaxRecursionDepth(200)]

See Also