Re: Simple Mathematica expression Q
- To: mathgroup at smc.vnet.net
- Subject: [mg23491] Re: Simple Mathematica expression Q
- From: "Dale Horton" <daleh at wolfram.com>
- Date: Fri, 12 May 2000 22:54:29 -0400 (EDT)
- Organization: Wolfram Research, Inc.
- References: <8er80d$h70@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
While the kernel recognizes that Cell and Notebook (and other fe expressions) exist, the kernel does not have definitions for these objects. To the kernel, Cell[x=1,"Input"] is much like f[x=1,"Input"] when f is undefined. It sets x to 1, replaces x=1 with 1, and returns the rest unevaluated. What the kernel can do is pass the expression to the fe, so that the fe can do something with it. This can be done in several ways. CellPrint, NotebookWrite, and DisplayForm for Cell[]s. NotebookPut for Notebook[]s. So what you probably want to do is CellPrint[Cell["x=1","Input"]] See "The M_ Book", section 2.10. -Dale Arturas Acus <acus at itpa.lt> wrote in message news:8er80d$h70 at smc.vnet.net... > Dear Group, > > I have a few suspicions about what is > "Mathematica expression". Or more exactly, > whether I correctly understand what it is. > > In versions 1 and 2, frontend part was simple, and all its only > work was to send all user input to the kernel (thought there was > cells, of course). So Mathematica expression was the same > as kernel expression. > Now we have front end expressions > like Cell[], Notebook[], etc which seems are ignored by kernel alone. > > For example I just started "math" in my Linux box > and performed a few small experiments. > > I put Cell[x=1,"Input] and get Cell[1,Input]. > > So Cell was not converted to "output" cell. > ?Cell show, that kernel know what the Cell[] is. > > Also kernel can generate (output) entire notebook expressions. > Indeed I would be thankful if somebody could help me to > understand this behaviour. > > Related question is: > Can Mathematica notebooks contain operating system > dependent expressions (parts)? > > Obviously system dependent bitmap images, when imported into notebook > are changed into system independent format. > > The only object I suspect is almost undocumented Raw[] > objects? > > Dr. Arturas Acus > Institute of Theoretical > Physics and Astronomy > Gostauto 12, 2600,Vilnius > Lithuania > > > E-mail: acus at itpa.lt > Fax: 370-2-225361 > Tel: 370-2-612906 >