[fpc-devel] Semicolon before else
David W Noon
david.w.noon at ntlworld.com
Tue Jan 26 02:06:10 CET 2010
On Tue, 26 Jan 2010 01:08:45 +0100, Aleksa Todorovic wrote about
[fpc-devel] Semicolon before else:
[snip]
> case p of
> '1': do_1;
> '2' if (q > 0) then do_2;
> else do_3;
> end;
>
> It is not clear if else should be part of branch '2' (part of if
> statement), or else branch for case.
A quick examination of Jensen & Wirth's original Pascal grammar will
tell you how that should be parsed: in Pascal there is *never* a
semi-colon between the "then" clause and the "else" in an "if"
statement.
--
Regards,
Dave [RLU #314465]
=======================================================================
david.w.noon at ntlworld.com (David W Noon)
=======================================================================
More information about the fpc-devel
mailing list