深入方法(6)- Result

//要点6: Result 可以参与运算, "函数名"不可以
function MyFun(x,y: Integer): Integer;
begin
  Result := x + y;
  Result := Result * 2;
end;

 

posted @ 2020-04-19 18:39  范思哲  阅读(190)  评论(0编辑  收藏  举报