[fpc-pascal] How to get address of MyFunction in MyFunction?

Jonas Maebe jonas.maebe at elis.ugent.be
Sun Jul 18 12:51:17 CEST 2010

On 18 Jul 2010, at 12:50, Jonas Maebe wrote:

> On 18 Jul 2010, at 12:11, Ċ½ilvinas Ledas wrote:
>> to get address of function I can use @MyFunction, but if I use it within MyFunction - I get address of Result. How can I get address of current function?
> @unitname.function (or @programname.function if you are in the main program file)

PS: if you want to use this to calculate the size of functions: don't. The linker can reorder the functions compared to how they are declared in your source file.


More information about the fpc-pascal mailing list