Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: Show left hand side

  • To: mathgroup at smc.vnet.net
  • Subject: [mg111054] Re: Show left hand side
  • From: "Nasser M. Abbasi" <nma at 12000.org>
  • Date: Sun, 18 Jul 2010 01:05:53 -0400 (EDT)
  • References: <i1s6vd$a2u$1@smc.vnet.net>
  • Reply-to: nma at 12000.org

On 7/17/2010 5:16 AM, Sam Takoy wrote:
> Hi,
>
> When Mathematica prints an expression not terminated by a semicolon, I
> find it hard to match up the output with what I was trying output when a
> block of commands has many commands not terminated by a semicolon. Is
> there a way to get Mathematica to output the LHS so when I have R=1+1 it
> outputs R = 2 or something like that.
>
> Thanks!
>
>

I think You are trying to find a solution to the not best way of using 
Mathematica. Better to change the method you are using.

I would put each command in a separate cell. This way, you will have one 
command followed by its output below it. I like to also use the Report 
style sheet, this makes output cells more clear.

But if you want to have more than one command in the same cell, you 
could always use Print[] to print the output of the command, and this 
way you can add a string label to the Print command to help you 
determine which command it was.

Something like

Print["x=", x = Pi/2];
Print["a=", a = Sin[x]];
Print["c=", c = Sin[x]];

x=Pi/2
a=1
c=1

OR

x = Pi/2;
Print["x=",%];

a = Sin[x]];
Print["a=", %];

etc...


--Nasser


  • Prev by Date: Re: Avoid the use of certain functions
  • Next by Date: Re: Percentage Formating
  • Previous by thread: Re: Show left hand side
  • Next by thread: Re: Show left hand side