On 02/02/2016 10:31 AM, Graeme Geldenhuys wrote:
Exactly! I'm glad somebody noticed that too.
Of course I did notice :-) .
V := If a < 3 then 1 else 2;
In fact extends a several language paradigms:
- a keyword (such as "if") returns a value
- a statement (such as "if ....", and the content of an if clause )
returns a value
- an expression (such as "1") is accepted as a statement (and hence
allowed in a n if clause)
This _might_ be viable and doable, as its a pure optional extension.
-Michael
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal