MaxIntValue¶
Return largest element in integer array.
Declaration¶
Source position: math.pp line 222
function MaxIntValue(const Data: Array of Integer) : Integer;
Errors¶
None.
See also¶
| Name | Description |
|---|---|
| maxvalue | Return largest value in array. |
| minvalue | Return smallest value in array. |
| minIntValue | Return smallest value in integer array. |
Example¶
Program Example25;
{ Program to demonstrate the MaxIntValue function. }
{ Make sore integer is 32 bit}
{$mode objfpc}
Uses math;
Type
TExArray = Array[1..100] of Integer;
Var
I : Integer;
ExArray : TExArray;
begin
Randomize;
for I:=low(exarray) to high(exarray) do
ExArray[i]:=Random(I)-Random(100);
Writeln(MaxIntValue(ExArray));
end.