[fpc-pascal] New feature: IfThen() intrinsic
Serguei TARASSOV
serge at arbinada.com
Tue Feb 2 11:40:49 CET 2016
On 02/02/2016 11:30, fpc-pascal-request at lists.freepascal.org wrote:
> On Tue, 2 Feb 2016, Henry Vermaak wrote:
>
>> >On Tue, Feb 02, 2016 at 10:49:03AM +0100, Michael Van Canneyt wrote:
>>> >>So the iif in either functional or expression form has my vote.
>> >
>> >I'm surprised that you support iif in function call form. Making
>> >something that looks like a function call but may not behave as a
>> >function call (short cut eval) seems like a recipe for disaster.
> Would you mind explaining why ?
I suppose, because of dependence on argument's order processing, isn't it?
- programmer must remember this dependency
- every compiler must follow this dependency
- in common case, it cannot be calculated concurrently (i.e. in parallel)
In C the calculation order of argument is undefined AFAIK.
Regards,
Serguei
More information about the fpc-pascal
mailing list