Re: Recognize multiple outputs
- To: mathgroup at smc.vnet.net
- Subject: [mg118049] Re: Recognize multiple outputs
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Sat, 9 Apr 2011 18:00:16 -0400 (EDT)
SetAttributes[assign, HoldFirst]; assign[x_, expr_] := (Clear[x]; ToString[x] <> " = " <> ToString[TraditionalForm[x = expr]]); assign[a, 10^2] a = 100 You cannot use Out to reference the value. Head[%] String But the variableis is set and can be used. a 100 Bob Hanlon ---- "mailcwc at gmail.com" <mailcwc at gmail.com> wrote: ============= Is it possible to show the name of the variables in the output cell? For example, currently I have [In1] a=10^2 [Out1] 100 I want it to be [Out1] a=100 The reason for this is when we have multiple lines of calculation in an input cell, sometimes it is hard to recognize which number is which, especially when the input cell has several pages and the calculations are scattered in the cell.