TracePrint
Usage
• TracePrint[expr]显示在expr的计算中使用的所有表达式。
• TracePrint[expr, form] 仅包括匹配form的表达式。
• TracePrint[expr, s] 包括所有使用和符号s相关的变换规则的计算。
Notes
• TracePrint 缩进它的输出保持与由Trace产生的列表的嵌套层一致。 • TracePrint缩进使用对对象Indent[d]定义的显示形式进行。 • TracePrint 在它们的任何元素被计算前显示表达式形式。 • TracePrint并不支持Trace的选项TraceBackward。 • TracePrint 仅产生由选项设置TraceAbove -> All指定的输出的前面部分。 • TracePrint[expr]返回计算expr的结果。
Further Examples
Here is the recursive definition of the Fibonacci numbers.
In[1]:=
|
Here are the end conditions for the recursion.
In[2]:=
|
Out[2]=
|
This prints expressions encountered in the evaluation of fib[3].
In[3]:=
|


















Out[3]=
|
|