[Delphi (Object Pascal)] Delphi 返回一个浮点数数组中的最小值 →→→→→进入此内容的聊天室

来自 , 2019-08-13, 写在 Delphi (Object Pascal), 查看 98 次.
URL http://www.code666.cn/view/f29e2360
  1. function MinOfArray(const A: array of Double): Double; overload;
  2. var
  3.   Idx: Integer;
  4. begin
  5.   Assert(Length(A) > 0);
  6.   Result := A[Low(A)];
  7.   for Idx := Succ(Low(A)) to High(A) do
  8.     if A[Idx] < Result then
  9.       Result := A[Idx];
  10. end;
  11. //delphi/2285

回复 "Delphi 返回一个浮点数数组中的最小值"

这儿你可以回复上面这条便签

captcha