[fpc-pascal] Argument evaluation order in Free Pascal and Delphi
Jonas Maebe
jonas.maebe at elis.ugent.be
Tue Oct 29 13:13:12 CET 2013
On 29 Oct 2013, at 09:44, Michael Van Canneyt wrote:
> On Tue, 29 Oct 2013, Sven Barth wrote:
>
>> The Delphi documentation is however rather vague:
>> http://docwiki.embarcadero.com/RADStudio/XE5/en/Procedures_and_Functions#Calling_Conventions
>
> I know this, and it says explicitly
>
> "For the register and pascal conventions, the evaluation order is
> not defined."
I think they use "evaluation order" as a synonym for "parameter
passing order" on that page, given the table below: it says that the
order in which the parameters are passed for register/pascal is
undefined. That basically means that pure assembler routines using the
register or pascal calling conventions are no longer supported in
Delphi, since you can't know how the parameters are passed (or at
least there are no guarantees about it).
Jonas
More information about the fpc-pascal
mailing list