[fpc-pascal] Jump AfterConstruction method

Joao Morais post at joaomorais.com.br
Sat Mar 4 22:15:48 CET 2006


Hello,

I have a constructor that, is some circumstances, need to return nil (is 
part of an OPF framework), after calling the inherited create method. 
This piece of code works fine with Delphi:

   Destroy;
   Self := nil;
   asm
     MOV     [EBP - $09], EAX // Avoid calling AfterConstruction
     POP     dword ptr fs:[$00000000]
     ADD     ESP, $0C
   end;

What should I do for a FPC platform independent code?

Thanks,
--
Joao Morais



More information about the fpc-pascal mailing list