Sign in Join
FPDoc Onlineexperiment

MaxIntValue function

In unit Math

Return largest element in integer array.

Declaration

pascal
function MaxIntValue(const Data: Array of Integer): Integer

Description

MaxIntValue returns the largest integer out of the Data array.

This function is provided for Delphi compatibility, use the maxvalue function instead.

Errors

None.

See also

Example: ex25

pascal
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.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.