MathGroup Archive 2005

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

Search the Archive

Re: Cell execution dependence

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61955] Re: [mg61952] Cell execution dependence
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Sun, 6 Nov 2005 05:11:30 -0500 (EST)
  • Reply-to: jfultz at wolfram.com
  • Sender: owner-wri-mathgroup at wolfram.com

You're correct.  The front end uses the same rules as the kernel for 
determining whether a line break indicates the end of an input.  That is to 
say, if you have a complete expression (all delimiters matched, no dangling 
infix operators) when a line breaks, then this will be considered a unitary 
input, and we start again with a new input on the next line.

And so, things like...

f[x] g[y] (* equivalent to f[x] * g[x] *)
x // f (* equivalent to f[x] *)

are *not* the same as...

f[x] (* equivalent to f[x] *)
g[x] (* equivalent to g[x] *)

x    (* equivalent to x *)
// f (* a syntax error *)

Sincerely,

John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.


On Sat, 5 Nov 2005 01:53:05 -0500 (EST), carlos at colorado.edu wrote:
> This post is related to a separate one on Mathematica
> treatment of whitespace. But I thought it may be useful to clarify a
> couple of related points by asking two general questions.
> Given an input cell:
>
> 1) Are the results of cell execution independent of line breaks?
> (More precisely, what is the effect of adding or removing CR/LF
> chars)
> 2) Are the results of cell execution independent of inactive whitespace?
> (where "inactive" is specified by the rules of the language)
>
> My guesses are: no and yes.



  • Prev by Date: Re: Removed[$$Failure] in Integrate
  • Next by Date: Re: Re: Mathematica GuideBooks
  • Previous by thread: Re: Cell execution dependence
  • Next by thread: Re: Cell execution dependence