<p>Am 02.02.2016 13:38 schrieb "Andreas Berger" <<a href="mailto:Andreas@thebergerclan.org">Andreas@thebergerclan.org</a>>:<br>
><br>
><br>
> On Tue 02/02/2016 09:27, Jonas Maebe wrote:<br>
>><br>
>><br>
>> The parameter evaluation order issue is irrelevant in this context: Delphi guarantees left-to-right (or used to anyway, this may have changed), FPC doesn't guarantee anything.<br>
>><br>
> Wow, what's this? I never knew this. I have been using Borland products since TP 1.0 and for me left-to-right is automatic, I don't even think about it. If FPC doesn't guarantee this my code is full of potential problems.<br>
> BTW using left-to-right does not mean non-robust code if it is guaranteed.</p>
<p>FPC indeed does not guarantee the evaluation order (and that's even documented AFAIK). It might change the evaluation order to generate better code. It only guarantees that each parameter is evaluated exactly once (though in case of expressions without calls it might reuse results in certain optimization settings, I don't know that currently though) and that the parameters are passed in the correct order.</p>
<p>Regards,<br>
Sven</p>