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