[fpc-pascal] IfThen() intrinsic removed
Lukasz Sokol
el.es.cr at gmail.com
Fri Feb 5 10:49:35 CET 2016
On 05/02/16 09:45, Michael Van Canneyt wrote:
>
[...]
>> so I think no /current/ keywords would be allowed either... I see.
>
> Anything that spells 'statement' is indeed going to meet with fierce resistance.
>
>>
>> What of
>>
>> x := ( condition, true:=truevalue, false:=falsevalue);
>
> Apart from any parsing difficulties this may present, what is the benefit over
>
> x:=condition ? truevalue : falsevalue
>
> The latter being the generally used one ?
>
That it's C, not Pascal ;) and, um. sorry I do not have a c spec on hand,
does it really work that way in C - only evaluates truevalue or falsevalue not both?
I wrote another one in another email, maybe actually having new keyword or 2 is ok ?
and require it to be an assignment, like
x := ( condition; whentrue:=true_value; whenfalse:=false_value);
so syntactic sugar but not abusing function calls, but an assignment instead.
> Michael.
el es
More information about the fpc-pascal
mailing list