But in Mathematica, the semicolon is NOT a terminator at all. Rather,
it's a SEPARATOR -- between parts of a CompoundExpression. (Something
of the form "a;b;...", etc.)
When the user omits the final statement in the compound expression, as
in "a;b;" then Mathematica inserts Null as that missing final statement.
Since Null is normally not printed as a result, the effect is to
display no output whatsoever.
It's as sensible to insist that Mathematica "should" adopt this or that
syntactical convention of some other programming language, as to insist
that, say, English should obey the syntax rules of some other natural
language.
carlos at colorado.edu wrote:
> Mathematica should mandate ; as terminator of any expression,
> as in C. Then problems such as the one noted by the OP
> would disappear: with CR/LF uniformly ignored source interpretation
> becomes more linebreak independent.
>
> Also the common warning about "this statement
> will be interpreted as implicit multiplication" in modules, with
> consequent risk of infinite recursion, would go away.
>
> To get an expression printed a short construct such as
>
> a = Sin[Pi/2] >>;
>
> which outputs "a=1" could be introduced to avoid the
> verbosity of Print. This could be easily edited in and out in
> module debugging.
>
>
--
Murray Eisenberg murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305