IMath.Abs

Fore Syntax

Abs(Value: Double): Double;

Fore.NET Syntax

Abs(Value: double): double;

Parameters

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

Description

The Abs method returns absolute value (module) of number.

Comments

Parameter value cannot be empty.

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

To get absolute value of integer number, use the IMath.AbsI method.

Fore Example

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

Sub UserProc;
Var
    r: Double;
Begin
    r := Math.Abs(-4.645);
    Debug.WriteLine(r);
End Sub UserProc;

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

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.Abs(-4.645);
    System.Diagnostics.Debug.WriteLine(r);
End Sub;

See also:

IMath