MathGroup Archive 2008

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

Search the Archive

Strange parsing error.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84915] Strange parsing error.
  • From: "Nasser Abbasi" <nma at 12000.org>
  • Date: Sat, 19 Jan 2008 06:02:11 -0500 (EST)

Which one of the following  you think has syntax error? (without trying, 
just by looking)


Module[{},0]

Module                       [{},0]

Module                           [
{},0]

Module
[{},0]

Module    [{},0
]

Module                   [
{
},0]


Module[
{
}
,
0
]


If you guessed the 4th one, you are correct. But it sure do not make sense 
to me.

 Why is
                               "Module                        ["
ok, but

"Module
["

is not?

spaces and new lines should not make a difference. They don't seem to make 
different for everything else, so why for the opening "[" of Module? (this 
apply to opening "[" of anything else in Mathematica btw, such as If[, 
Which[, etc.. The opening "[" has to be on the same line. It can be 
separated by many spaces, but only by spaces, not even tabs are allowed !
Nasser



  • Prev by Date: Re: Don't understand behavior of ClearAttributes[Plus,
  • Next by Date: RE: Re: printing stylesheets?
  • Previous by thread: V6 DumpSave kills kernel
  • Next by thread: Re: Strange parsing error.