Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

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



  • Prev by Date: torus connections in Riemannian sheet trajectories?
  • Next by Date: Re: How to coerce a string pattern to an ordinary pattern?
  • Previous by thread: torus connections in Riemannian sheet trajectories?
  • Next by thread: How to set up Intel C++ Composer XE for Mathematica on windows 7?