Sign in Join
FPDoc Onlineexperiment

MinIntValue function

In unit Math

Return smallest value in integer array.

Declaration

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

Description

MinIntvalue returns the smallest value in the Data array.

This function is provided for Delphi compatibility, use minvalue instead.

Errors

None

See also

Example: ex30

pascal
Program Example30;

{ Program to demonstrate the MinIntValue 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(MinIntValue(ExArray));
end.

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