//要点17: 如果前面的方法要调用后面的方法, 后面的方法需要提前声明
function MyFunB(x: Integer): Integer; forward; {使用 forward 指示字提前声明}

function MyFunA(x: Integer): Integer;
begin
  Result := MyFunB(x) * 3; {要调用后面的方法, 后面的方法需要提前声明}
end;

function MyFunB(x: Integer): Integer;
begin
  Result := Abs(x);
end;

posted on 2008-01-14 21:40  万一  阅读(4008)  评论(0编辑  收藏  举报