[fpc-pascal] New feature: IfThen() intrinsic

silvioprog silvioprog at gmail.com
Sun Jan 31 17:03:20 CET 2016

On Sun, Jan 31, 2016 at 11:43 AM, Sven Barth <pascaldragon at googlemail.com>

> Hello together!
> I've finally come around to add a feature that many people have asked
> for throughout the years: an inline if that works like the if-statement
> in that it only evaluates that expression that is indeed returned.
> After the discussion last year about the inline-if I've decided to add
> it as an intrinsic function instead of an extension of the language.
> Like all intrinsics it's part of the System unit and "declared" like this:
> === code begin ===
> function IfThen(Condition: Boolean; ThenExpr, ElseExpr: type): type;
> === code end ===

> If there are any combinations of types that should work, but do not,
> please don't hesistate to report them at http://bugs.freepascal.org/

First issue sent to: http://bugs.freepascal.org/view.php?id=29554. :-)

Silvio Cl├ęcio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160131/08cd7d3e/attachment.html>

More information about the fpc-pascal mailing list