[fpc-devel] Re: out vs. var

Sven Barth pascaldragon at googlemail.com
Mon Nov 28 12:26:41 CET 2011


Am 28.11.2011 12:02, schrieb Michael Müller:
>> Additionally, if you use the -gt command line option then the compiler will overwrite the contents of (non-reference-counted) out-parameters in the function entry code. This switch will do nothing for open array parameters though, because it lacks support for using the hidden "high" parameter to determine the bounds of the array at run time.
>
> I don't understand this restriction. In the code High() works for open arrays at run time.

I suppose that the "-gt" code is generated on a lower level, so it can't 
just use High(), but would need to access the hidden parameter that 
contains the array length directly. And that part is simply not 
implemented, so open arrays are not handled.

Regards,
Sven



More information about the fpc-devel mailing list