IMath.Min

Fore Syntax

Min(Values: Array): Double;

Fore.NET Syntax

Min(Values: System.Array): double;

Parameters

Values. Array of real numbers.

Description

The Min method returns the minimum value from a specified set of values.

Comments

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:Double;
    arr:array[5Of Double;
Begin
    arr[0]:=10.8;
    arr[1] := 7.19;
    arr[2]:=9.56;
    arr[3]:=27.96;
    arr[4]:=2;
    r:= math.Min(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: double;
    Math: MathClass = New MathClass();
    Arr: Array[5Of double;
Begin
    Arr[0] := 10.8;
    Arr[1] := 7.19;
    Arr[2] := 9.56;
    Arr[3] := 27.96;
    Arr[4] := 2;
    r := Math.Min(Arr);
    System.Diagnostics.Debug.WriteLine(r);
End Sub;

See also:

IMath