F:=ThisFunction(Object or class.Function);
查找方法的又一个方法;参数格式为:
1) 对象名.方法名,如果创建了对象,可用这种方法。
2) class(类名).方法名,如果是类方法,而且没有穿件对象,可以这样使用。
program test;
type A=class()
function F()
Begin
writeln("f");
End;
class function F2();
Begin
writeln("f2");
end;
End;
begin
//从对象中查找实例方法
AA:=createobject("A");
F:=ThisFunction(AA.F);
F.do();
//从类中查找类方法
F2:=ThisFunction(class(A).F2);
F2.do();
End.