Michael Van Canneyt wrote:
Is there a directive or mode that will allow a procedure variable to be
compatible with AddressOf() as defined? Alternatively is there a type which is
compatible with any procedure variable (i.e. like Modula-2's PROC, if my
memory is correct), and can I overload AddressOf() to handle the specific case
of a procedure passed as parameter while leaving it tolerant of other types?
No you cannot.
Shucks :-)
Did you try using Delphi mode ? The compiler uses other rules then.
Already am using (*$MODE DELPHI *)
After sleeping on the problem I've set up AddressOf as a macro with the
value @ which certainly compiles- I'm not at the stage of running the
program's own integrity tests yet.
From
http://lazarus-ccr.sourceforge.net/fpcdoc/prog/progse5.html#x121-1210002.2
I'm still a little uncertain whether macro definition uses := or = What
I have found though is that using (* *) doesn't work- the definition has
to be in {} However on the machine in question I'm still on version
2.2.0 of the compiler for various reasons.
--
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