leledumbo wrote:
FPC treats procedural types "a little" different from Delphi / TP, see http://www.freepascal.org/docs-html/ref/refse17.html this . You can
therefore write your AddressOf function as:
FUNCTION AddressOf(VAR x): POINTER; ... // variables (if you ever need)
begin
{$ifdef fpc}
AddressOf:=...@x;
{$else}
... // for other compilers
{$endif}
end;

That's exactly what I'm doing at the moment- plus a whole lot of extra complexity due to having to accommodate two different directive formats.

The problem isn't defining the AddressOf() function, it's applying it to a procedure variable as shown in my original message.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to