On 02/02/2016 14:33, fpc-pascal-requ...@lists.freepascal.org wrote:
Date: Tue, 2 Feb 2016 14:24:18 +0100
From: Sven Barth<pascaldra...@googlemail.com>
>
>Why make the things complex? Why create another "special case"?
>Look at the "iif" as an statement and the things will be simple.
BECAUSE. IT. IS.*NOT*. A. STATEMENT!
It never was and it never will be! It returns a value and thus by
definition it is an expression!
The first tile in my life I see such strange definition of expression :)
Please, use more generic notions.
As I said, "return" statement is a good example. The assignment one too.
And the principal difference between statement and expression that the
expression doesn't control execution flow.
As you can see, iif "expression" does.
In C the "?" statement called operator, it may be a good compromise.
Regards,
Serguei
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal