On Tue, Feb 2, 2016 at 7:49 AM, Michael Van Canneyt
<mich...@freepascal.org> wrote:
> It is not a statement, it is an expression.
>
> I prefer
>   x := iif Obj = nil then 0 else Obj.Value;
> over
>   x := if Obj = nil then 0 else Obj.Value;
>
> Because it clearly differentiates between if (a statement) and iif (an
> expression)
>
> So the iif in either functional or expression form has my vote.

+1

And why not use 'inline'?

  x := inline if Obj = nil then 0 else Obj.Value;

It's not necessary add one more keyword like "iif", I think.

Best regards,
Marcos Douglas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to