[fpc-pascal] fpc-pascal Digest, Vol 140, Issue 27
Serguei TARASSOV
serge at arbinada.com
Tue Feb 2 14:53:23 CET 2016
On 02/02/2016 14:33, fpc-pascal-request at lists.freepascal.org wrote:
> Date: Tue, 2 Feb 2016 14:24:18 +0100
> From: Sven Barth<pascaldragon at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160202/a2e4bfe7/attachment.html>
More information about the fpc-pascal
mailing list