[fpc-pascal] Argument evaluation order in Free Pascal and Delphi

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Oct 29 09:41:43 CET 2013

On 29 Oct 2013, at 08:35, Michael Van Canneyt <michael at freepascal.org> wrote:

> On Mon, 28 Oct 2013, Dmitry Pribysh wrote:
>> As it is written in Free Pascal wiki, order of parameter evaluation is not defined in FPC, but it is defined in Delphi (Delphi
>> guarantees left-to-right evaluation order).
> Strange. Where is that documented ?

In the Delphi documentation in the past, but apparently this has changed (both the documentation and the implementation). Now it says that the order is undefined. See http://stackoverflow.com/questions/11010456/in-delphi-are-parameters-evaluated-in-order-when-passed-into-a-method, the linked Delphi documentation page at http://docwiki.embarcadero.com/RADStudio/XE5/en/Procedures_and_Functions#Calling_Conventions and Barry Kelly's blog post from 2008 at http://blog.barrkel.com/2008/04/c-evaluation-order-gotcha.html?m=1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20131029/1c57a759/attachment.html>

More information about the fpc-pascal mailing list