TraceBackward

TraceBackward

is an option for Trace and related functions which specifies whether to include preceding expressions on the evaluation chain that contains the pattern form sought.

Details

  • TraceBackward->True includes the first expression on the evaluation chain that contains form.
  • TraceBackward->All includes all expressions before form on the evaluation chain that contains form.
  • TraceBackward allows you to see the previous forms that an expression had during an evaluation.

Examples

Basic Examples  (1)

A recursive definition for finding Fibonacci numbers:

In[1]:=
Click for copyable input

Show only what additions of positive integers are required:

In[2]:=
Click for copyable input
Out[2]=

Show the beginning of the evaluation chain that leads to each addition:

In[3]:=
Click for copyable input
Out[3]=

Show all intermediate evaluations that led to each addition:

In[4]:=
Click for copyable input
Out[4]=

See Also

Trace  StackComplete

Tutorials

Introduced in 1991
(2.0)