[fpc-pascal] Question about functions returning a string
Dan
dan.soft.studio at gmail.com
Fri Dec 26 12:59:14 CET 2014
On Nov 29, 2014 3:55 AM, "Ewald" <ewald at yellowcouch.org> wrote:
> Hi,
>
> Take the following function prototype (in {$mode objfpc}{$H+} for the
> record):
>
> Function SomeFunction(const Data: PChar; const Len: LongWord):
> String; cdecl; public;
>
> Looking at the dissasembly of this function, I see that is actually has
> three arguments. It looks more like this from an assembler perspective:
>
> Function SomeFunction(HiddenArgument: Pointer; const Data: PChar;
> const Len: LongWord): String; cdecl; public;
>
> Which is, well, quite fascinating really. What is it doing there? I
> suspect it has something to do with the result type of the function,
> being a string?
>
> Can anybody shed some light on this?
>
> --
> Ewald
>
>
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20141226/95d68695/attachment.html>
More information about the fpc-pascal
mailing list