[fpc-pascal] New feature: IfThen() intrinsic
Roberto P.
padovani.r at gmail.com
Mon Feb 1 23:34:15 CET 2016
Maybe we shouldn't focus all that much on the " if " word..since all in
all, it is meant to be differently from the language if-then-else
What about using another word suggesting a choice?
j := Switch(i < 32, 48, 21);
j := Select(i < 32, 48, 21);
j := Which(i < 32, 48, 21);
They look to me as a goog compromise between expressiveness (IfThen) and
typing-laziness (iif).
Roberto
2016-02-01 20:24 GMT+01:00 Philippe Lévi <Philippe at quarta.com.br>:
> iif ... sounds good to me! +1 !
> Philippe
>
> ________________________________________
> De: fpc-pascal-bounces at lists.freepascal.org <
> fpc-pascal-bounces at lists.freepascal.org> em nome de Marco van de Voort <
> marcov at stack.nl>
> Enviado: segunda-feira, 1 de fevereiro de 2016 16:22
> Para: FPC-Pascal users discussions
> Assunto: Re: [fpc-pascal] New feature: IfThen() intrinsic
>
> In our previous episode, Maciej Izak said:
> > >
> > iif is not semantic clear. IIF means "Immediate IF". Citation: "both
> > truepart and the falsepart will be evaluated regardless of which one is
> > actually returned." - https://en.wikipedia.org/wiki/IIf
>
> Well, correct that then :)
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160201/d021ba82/attachment.html>
More information about the fpc-pascal
mailing list