] generates a list of all expressions used in the evaluation of expr.
] includes only those expressions which match form.
] includes all evaluations which use transformation rules associated with the symbol s.
In general, form in Trace[
] is compared both with each complete expression that is evaluated, and with the tag associated with any transformation rule used in the evaluation.
] picks out expressions which match lhs, then replaces them with rhs in the list returned.
All expressions in the list returned by Trace are wrapped in HoldForm.
Trace returns a set of nested lists. Each individual list corresponds to a single evaluation chain, which contains the sequence of forms found for a particular expression. The list has sublists which give the histories of subsidiary evaluations.
Example: Trace[2 3 + 4].
The following options can be given:
During the execution of Trace, the settings for the form argument, and for the options TraceOn and TraceOff, can be modified by resetting the values of the global variables $TracePattern, $TraceOn and $TraceOff, respectively.
See the Mathematica book: Section 2.5.4, Section 2.5.10.
See also: TraceDialog, TracePrint, TraceScan.
This show the order of operations in a simple arithmetic expression.
Here is the recursive definition of the Fibonacci numbers.
Here are the end conditions for the recursion.
This tells Trace to return only the arguments of fib used in the evaluation of fib.
This shows all occurrences of fib in the evaluation of fib.
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER
FOR THE LATEST INFORMATION.