IMath.MaxI

Syntax

MaxI(Values: Array): Integer;

Parameters

Values. Array of integer numbers.

Description

The MaxI method returns the maximum integer value from the specified set of values.

Comments

It is required to use an array of value of the Integer type.

The function works correctly with both one-dimension and two-dimension arrays.

To get the least value from the specified set, use the IMath.Min method.

Example

To execute the example, add a link to the MathFin system assembly.

Sub UserProc;
Var r:Double;
    arr:array[5Of Integer;
Begin
    Arr[0] := 10;
    Arr[1] := 7;
    Arr[2] := 9;
    Arr[3] := 27;
    Arr[4] := 2;
    r:= math.MaxI(arr);
    Debug.WriteLine(r);
End Sub UserProc;

After executing the example the console window displays the greatest value equal to 27.

See also:

IMath