[fpc-pascal] New feature: IfThen() intrinsic
Maciej Izak
hnb.code at gmail.com
Mon Feb 1 09:26:42 CET 2016
2016-02-01 8:59 GMT+01:00 Marco van de Voort <marcov at stack.nl>:
> The only really bad thing is the name, as Florian already said, with the
> versions in strutils and math. The clash with delphi compatible functions
> should be avoided.
+1 . IfThen instricit is IMO very bad idea. I have a lot of "IfThen" from
math and strutils modules.
IfThen from System totally breaks the compatibility :\ . C'mon Sven. In one
field you're rigorously but in something like this you're liberal
(braking/dangerous change / for existing code base).
If i understand correctly "ThenExpr" is executed only when "Condition" is
true and "ElseExpr" is executed only when "Condition" is false. For
standard "IfThen" from Math and StrUtils "ThenExpr" and "ElseExpr" is
executed before IfThen is called.
for me different syntax for System.IfThen is required (fpIfThen ? or
http://docs.elementscompiler.com/Oxygene/Expressions/If/ ).
--
Best regards,
Maciej Izak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160201/d463b300/attachment.html>
More information about the fpc-pascal
mailing list