MathGroup Archive 2005

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

Search the Archive

Help with output form?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60902] Help with output form?
  • From: "aufgang" <aufgang at agile.net>
  • Date: Mon, 3 Oct 2005 04:06:01 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

I am struggling to get mathematica to output certain expressions the
way I'd like and i'm wondering if anyone could help me.

normally, when you input an expression using the Set operator (=),
mathematica evaluates the expression, assigns the rhs to the lhs and
returns the evaluated rhs  (eg.  y=Expand[(a+b)^2] -> a^2+2 a b +b^2)

what I would like to do is coax mathematica to output the lhs as wel as
the evaluated rhs (ie.  y=Expand[(a+b)^2] -> y=a^2+2 a b +b^2).

I want the rhs to be evaluated like normal, and the value of the lhs to
be set to rhs, so so Hold, HoldForm, etc wont work (they keep the lhs
but wont evaluate the rhs and the value isnt actually set) and I know I
dont want to be using == instead of =.  i just want the lhs to appear
in the output.

the reson I want to do this is because I am calling the Mathematica
Kernel from a web app and I want to display this output format to the
users.

I suspect I could do this somehow by redefining Set or something but i
can't seem to figure that out.  

Thanks for any help.


  • Prev by Date: Re: Finding length in recursive definition?
  • Next by Date: Opinions?:Foundations of Fluid Mechanics with Applications
  • Previous by thread: Re: Exporting PNGs with transparent backgroud?
  • Next by thread: Re: Help with output form?