Tfun = REFERENCE to function(c, y: integer): integer;
function Ta(x, y: integer; Tb: Tfun): integer;
begin
result := Tb(x, y);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage(inttostr(Ta(7, 8, function(c, y: integer): integer//引处不能有分号;
begin
result :=x + y;
end)));
end;
匿名方法[1]
最新推荐文章于 2013-12-05 02:07:38 发布