<div dir="ltr"><div>This is usually called "inline if".</div><div><br></div>Maybe call it "inlineif" or "iif", e..g<div><br></div><div>x := iif (a < 3, 1, 2)</div><div><br></div><div>or even</div><div><br></div><div>x := iif a < 3 then 1 else 2;</div><div><br><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 1, 2016 at 10:26 AM, Maciej Izak <span dir="ltr"><<a href="mailto:hnb.code@gmail.com" target="_blank">hnb.code@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">2016-02-01 8:59 GMT+01:00 Marco van de Voort <span dir="ltr"><<a href="mailto:marcov@stack.nl" target="_blank">marcov@stack.nl</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">The only really bad thing is the name, as Florian already said, with the<br>
versions in strutils and math. The clash with delphi compatible functions<br>
should be avoided.</blockquote><div><br></div></span><div>+1 . IfThen instricit is IMO very bad idea. I have a lot of "IfThen" from math and strutils modules.</div><div><br></div><div>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).</div><div><br></div><div>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.</div><div><br></div><div>for me different syntax for System.IfThen is required (fpIfThen ? or <a href="http://docs.elementscompiler.com/Oxygene/Expressions/If/" target="_blank">http://docs.elementscompiler.com/Oxygene/Expressions/If/</a> ).</div></div></div></div></blockquote></div><br></div></div></div></div>