Am 01.02.2016 09:35 schrieb "David Butler" <djbut...@gmail.com>:
>
> This is usually called "inline if".
>
> Maybe call it "inlineif" or "iif", e..g
>
> x := iif (a < 3, 1, 2)
>
> or even
>
> x := iif a < 3 then 1 else 2;

I personally would have preferred "if a < 3 then 1 else 2", but a
discussion on fpc-devel a dew months ago has shown that there are quite
some against it... I myself am against a c-like operator like ?: and thus
the intrinsic came as a compromise.

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to