IMath.Int

Fore Syntax

Int(Value: Double): Integer;

Fore.NET Syntax

Int(Value: double): integer;

Parameters

Value. Rounded value.

Description

The Int method rounds the specified number down to the nearest integer.

Comments

Available values range for input parameter [MinInteger; MaxInteger]. MinInteger = -231, MaxInteger = 231 - 1.

If input parameter goes beyond the left border of available values, the method returns MinInteger.

If input parameter goes beyond the right border of available values, the method returns MaxInteger.

Fore Example

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

Sub UserProc;
Var
    r: Integer;
Begin
    r := Math.Int(8.9);
    Debug.WriteLine(r);
End Sub UserProc;

After executing the example the console window displays the result of rounding to the nearest least integer equal to 8.

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();
Begin
    r := Math.Int(8.9);
    System.Diagnostics.Debug.WriteLine(r);
End Sub;

See also:

IMath | IMath.Trunc