IMath.MinI

Fore Syntax

MinI(Values: Array): Integer;

Fore.NET Syntax

MinI(Values: System.Array): integer;

Parameters

Values. Array of integer numbers.

Description

The MinI method returns the minimum integer value from a 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 greatest value from the specified set, use the IMath.Max method.

Fore Example

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

Sub UserProc;
Var
    r: Integer;
    Arr: Array[5Of Integer;
Begin
    Arr[0] := 10;
    Arr[1] := 7;
    Arr[2] := 9;
    Arr[3] := 27;
    Arr[4] := 2;
    r := Math.MinI(Arr);
    Debug.WriteLine(r);
End Sub UserProc;

After executing the example the console window displays the least value equal to 2.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.MathFin;

Public Shared Sub Main(Params: StartParams);
Var
    r: Integer;
    Math: MathClass = New MathClass();
    Arr: Array[5Of integer;
Begin
    Arr[0] := 10;
    Arr[1] := 7;
    Arr[2] := 9;
    Arr[3] := 27;
    Arr[4] := 2;
    r := Math.MinI(Arr);
    System.Diagnostics.Debug.WriteLine(r);
End Sub;

See also:

IMath