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
- Follow-Ups:
- Re: Printing Variables and Their Values
- From: Andrzej Kozlowski <akoz@mimuw.edu.pl>
- Re: Printing Variables and Their Values