H
hongy
Unregistered / Unconfirmed
GUEST, unregistred user!
帮帮看看错误的这段代码:怎么有时取不出正确值
function GetMax(IntDynArray: Array of Integer): Integer;
var
L,I: Integer;
begin
Result := 0;
L := Length(IntDynArray);
if L = 0 then Exit
else
begin
Result := IntDynArray[Low(IntDynArray)];
for I := Low(IntDynArray) to High(IntDynArray)-1 do
Result := Max(Result, IntDynArray);
end;
end;
function GetMax(IntDynArray: Array of Integer): Integer;
var
L,I: Integer;
begin
Result := 0;
L := Length(IntDynArray);
if L = 0 then Exit
else
begin
Result := IntDynArray[Low(IntDynArray)];
for I := Low(IntDynArray) to High(IntDynArray)-1 do
Result := Max(Result, IntDynArray);
end;
end;