$IterationLimit

$IterationLimit

gives the maximum length of evaluation chain used in trying to evaluate any expression.

Details

  • $IterationLimit limits the number of times the Wolfram Language tries to reevaluate a particular expression.
  • $IterationLimit gives an upper limit on the length of any list that can be generated by Trace.

Examples

open allclose all

Basic Examples  (2)

The default $IterationLimit:

Define a function in an iterative fashion:

Evaluate by temporarily setting $IterationLimit to a different value:

With a higher $IterationLimit, the function can be computed:

Scope  (1)

The iteration limit can be set to to allow any number of evaluation steps:

Properties & Relations  (2)

The iteration limit protects against runaway definitions:

The recursion limit protects against recursive runaway definitions:

Possible Issues  (1)

$IterationLimit only applies to reevaluation of expressions and not looping constructs like Do and While:

Wolfram Research (1991), $IterationLimit, Wolfram Language function, https://reference.wolfram.com/language/ref/$IterationLimit.html.

Text

Wolfram Research (1991), $IterationLimit, Wolfram Language function, https://reference.wolfram.com/language/ref/$IterationLimit.html.

CMS

Wolfram Language. 1991. "$IterationLimit." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/$IterationLimit.html.

APA

Wolfram Language. (1991). $IterationLimit. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$IterationLimit.html

BibTeX

@misc{reference.wolfram_2024_$iterationlimit, author="Wolfram Research", title="{$IterationLimit}", year="1991", howpublished="\url{https://reference.wolfram.com/language/ref/$IterationLimit.html}", note=[Accessed: 22-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_$iterationlimit, organization={Wolfram Research}, title={$IterationLimit}, year={1991}, url={https://reference.wolfram.com/language/ref/$IterationLimit.html}, note=[Accessed: 22-December-2024 ]}