Re: 2.9.2 How Input and Output Work
- To: mathgroup at smc.vnet.net
- Subject: [mg61878] Re: 2.9.2 How Input and Output Work
- From: David Bailey <dave at Remove_Thisdbailey.co.uk>
- Date: Thu, 3 Nov 2005 04:58:47 -0500 (EST)
- References: <dk6v53$fh2$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Steven T. Hatton wrote: > 2.9.2 How Input and Output Work of the online help states that: > > "When you type something like x^2 what Mathematica at first sees is just the > string of characters x, ^, 2. But with the usual way that Mathematica is > set up, it immediately knows to convert this string of characters into the > expression Power[x, 2]." > > What does "immediately" mean in this context? As soon as I press the '2' > key? When I evaluate the cell? If it is the former, then why do I see > "Cell[BoxData[SuperscriptBox["x", "2"]], "Input"]" when I view the > expression? Hello, If you are seeing a SuperScriptBox, then you either input your x^2 using a palete/Ctrl^/etc - so there wasn't just a string of normal characters - or perhaps you converted the input to StandardForm after typing it in. There are two distinct things going on here - conversion to a SuperScriptBox - which is done by the FrontEnd, and the subsequent conversion of x^2 or the corresponding BoxForm expression to Power[x,2] - which is done by the kernel when you actually execute the cell. Note that the kernel understands both the linear list of characters OR the BoxForm expression. David Bailey http://www.dbaileyconsultancy.co.uk