理解 Delphi 的类(十)

//要点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;

 
原文地址:https://www.cnblogs.com/jijm123/p/10491672.html