这个很简单,pascal支持特殊的函数“类型”,而且其间的匹配并非严格的按名匹配,比如:
你可以声明
type TMyFunction = function(i: integer): boolean;function MyI(j: integer): boolean;
begin
...
end;procedure OtherFunction(func: TMyfunction);
begin
...
end;begin
...
OtherFunc(MyI);
...
end.就可以啦。
你可以声明
type TMyFunction = function(i: integer): boolean;function MyI(j: integer): boolean;
begin
...
end;procedure OtherFunction(func: TMyfunction);
begin
...
end;begin
...
OtherFunc(MyI);
...
end.就可以啦。
...
mp(v);
....