IMath.RandBetweenI

Fore Syntax

RandBetweenI(Bottom: Integer; Top: Integer): Integer;

Fore.NET Syntax

RandBetweenI(Bottom: integer; Top: integer): integer;

Parameters

Bottom. Bottom border of the range.

Top. Top border of the range.

Description

The RandBetweenI method returns a random integer number between two specified numbers.

Comments

To get evenly distributed random real number in the range [0; 1), use the IMath.Rand method.

Fore Example

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

Sub UserProc;
Var
    r: Double;
Begin
    r := Math.RandBetweenI(0,100);
    Debug.WriteLine(r);
End Sub UserProc;

After executing the example the console window displays a random number.

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();
Begin
    r := Math.RandBetweenI(0,100);
    System.Diagnostics.Debug.WriteLine(r);
End Sub;

See also:

IMath