Forwarded from marcov@stack.nl (Marco van de Voort):
In gmane.comp.compilers.gpc, you wrote:
Delphi syntax
type tbla = procedure bla(param1,param2,param3:integer) of object;
Only allowed to assign methods. (classes model)
Internally such beast is a record ("TMethod") with two fields. "code" and "data". Code contains a ptr to the function, data self or nil.
(the latter in case of "class" (static) methods)
Assignment is simple
var bla: tbla;
begin bla:=xx.methodname; end;
Frank Heckenbach wrote:
So IIUC, the difference to Markus' way is that here the procedural variable also contains the object, while there it only points to the method, and can be applied to any object (of matching type), right?
Frank