Mathematica 9 is now available
 Documentation / Mathematica / Built-in Functions / Programming / Debugging  /
TraceForward

  • TraceForward is an option for Trace and related functions which specifies whether to include later expressions on the evaluation chain that contains the pattern form sought.
  • TraceForward -> True includes the final expression on the evaluation chain that contains form.
  • TraceForward -> All includes all expressions after form on the evaluation chain that contains form.
  • TraceForward allows you to see the transformations performed on an expression generated during an evaluation.
  • See the Mathematica book: Section 2.5.10.

    Further Examples

    Here is the recursive definition of the Fibonacci numbers.

    In[1]:=

    Here are the end conditions for the recursion.

    In[2]:=

    This shows all expressions following fib[5] in the evaluation chain of fib[8].

    In[3]:=

    Out[3]=



    Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
    THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
    SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.