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

相关文章:

  • 2021-09-25
  • 2021-11-30
  • 2021-05-31
  • 2022-02-20
猜你喜欢
  • 2021-07-23
  • 2022-01-02
相关资源
相似解决方案