2016-02-02 10:07 GMT+01:00 Michael Van Canneyt <mich...@freepascal.org>:
> Call me old fashioned, but then I think > foo:=iif(Condition1, > iif(Condition2, ThenExpr1, ElseExpr1), > iif(Condition3, ThenExpr2, ElseExpr2)); > is more clear. > > The "if then" construct is really confusing. > "if then" is a statement, not an expression. Yup, you are old fashioned :). maybe is good idea to discuss "it then else" expression in dedicated thread "if-then-else expression". conclusion of this thread: *the best new name for "IfThen intrinsic" is iif* unless someone has a good opposite arguments? Pros for iif: - no conflicts with existing RTL code base (in this matter much much better than IfThen) - compatible with existing pascal solution (Oxygene) - short and logical name Cons: - a little different behavior than in other languages (but still compatible with Oxygene) - I like &if ;) -- Best regards, Maciej Izak
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal