Problems with tracedepth
- To: mathgroup at smc.vnet.net
- Subject: [mg124389] Problems with tracedepth
- From: Clark Kogan <kogan.clark at gmail.com>
- Date: Wed, 18 Jan 2012 05:58:49 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
Using the definitions:
fun1[] := sub1[] + sub2[] + sub3[];
sub1[] = 1; sub2[] = 2; sub3[] = 3;
And running the statement
Trace[fun1[], TraceDepth -> 2]
I get...
{fun1[],sub1[]+sub2[]+sub3[],{sub2[],2},1+2+3,6}
But shouldn't I be getting
{fun1[],sub1[]+sub2[]+sub3[],{sub1[],1},{sub2[],2},{sub3[],3},1+2+3,6}
or
{fun1[],sub1[]+sub2[]+sub3[],1+2+3,6}
I don't understand why the {sub2[],2} is coming up, and not the
{sub1[],1} or the {sub3[],3}.
Thanks!
Clark