IMath.AbsI

Fore Syntax

AbsI(Value: Integer): Integer;

Fore.NET Syntax

Abs(Value: integer): integer;

Parameters

Value. Integer number, which absolute value must be found.

Description

The AbsI method returns the absolute value (module) of an integer number.

Comments

To get absolute value of high-precision decimal number, use the IMath.AbsD method.

Fore Example

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

Sub UserProc;
Var
    r: Decimal;
Begin
    r := Math.AbsI(-4);
    Debug.WriteLine(r);
End Sub UserProc;

After executing the example the console window displays the absolute value of the set value 4.

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: decimal;
    Math: MathClass = New MathClass();
Begin
    r := Math.AbsI(-4);
    System.Diagnostics.Debug.WriteLine(r);
End Sub;

See also:

IMath