About semicolons at the end of compound expressions

4 views
Skip to the first unread message

Dani Novak

unread,
24 Dec 2010, 14:32:2324/12/2010
to mathpiper-user
The following is illegal:

[a:=(3+2);b:= 3*2]

but this is ok;

[a:=(3+2);b:= 3*2;]

Is there a reason for that? Many beginners may have problems with
this.

Cheers,

--Dani

Howard Ostrowsky

unread,
24 Dec 2010, 14:51:2524/12/2010
to mathpip...@googlegroups.com
As I understand it, semicolon marks the end of a statement unit, and is required in a fold but not required (except between statements on a single line) in the console.  The brackets, on the other hand, represent a higher-level program unit (think {} in C).  I am not sure this is entirely accurate, but it works for me.

Sherm
Reply all
Reply to author
Forward
0 new messages