Re: printing symbols at as a table
- To: mathgroup at smc.vnet.net
- Subject: [mg95299] Re: printing symbols at as a table
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Wed, 14 Jan 2009 05:56:11 -0500 (EST)
- References: <gkgp85$3v3$1@smc.vnet.net>
Hi, SetAttributes[PrintTable, HoldAll] PrintTable[syms_List] := Module[{s = Hold[syms]}, s = s /. sym_Symbol /; ValueQ[sym] :> HoldForm[sym]; Grid[ Transpose[{s[[1]], ReleaseHold[s[[1]]]}], Frame -> All ] ] and m = 1; g = 9.81; q = 2; PrintTable[{m, g, q}] will do it. Regards Jens Magician wrote: > HiI have done a long calculation. But now I want to print some > variables and their values. eg: > > r 20 > g 2.34 > s m^2 + D > > and so on .... > as a summary. The In /Out makes me crazy. I want to create a table of > all values. with the symbol on the left ath value on the right. some > are numeric ei i have assigned a r. Now i want to get the symbol > 'r'. I hope i am not confusing here. >