MathGroup Archive 2004

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

Search the Archive

Printing Variables and Their Values

  • To: mathgroup at smc.vnet.net
  • Subject: [mg46410] Printing Variables and Their Values
  • From: "Bruce W. Colletti" <bcolletti at compuserve.com>
  • Date: Mon, 16 Feb 2004 23:43:56 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Re Mathematica 5.0.1.

For a list of variables, how would I successively print each variable's 
name followed by its value?

For instance, when x = 7, y = 5 and z = 4, feed list {x,y,z} into 
a function that prints "x = 7, y = 5, z = 4." 

Although Print["x = ", x, "  y = ", y, "  z = ", z] works, I want 
to automate this for any list. 

Thanks.

Bruce


  • Prev by Date: Re: matrix operations
  • Next by Date: Re: time series
  • Previous by thread: RE: Shared Functions
  • Next by thread: Re: Printing Variables and Their Values