[fpc-pascal] IfThen() intrinsic removed

Andreas andreasberger.516 at gmail.com
Fri Feb 5 11:35:25 CET 2016


On Fri 05/02/2016 07:49, Lukasz Sokol wrote:
> 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.
>
Well then how about: x *:=* *when* condition true_condition *otherwise* 
false_condition;

How this is pascalish.

Andreas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160205/2654999f/attachment.html>


More information about the fpc-pascal mailing list