IMath.AbsD

Fore Syntax

AbsD(Value: Decimal): Decimal;

Fore.NET Syntax

AbsD(Value: decimal): decimal;

Parameters

Value. High-precision decimal number, which absolute value must be found.

Description

The AbsD method returns the absolute value (module) of a high-precision decimal number.

Comments

To define numbers of the Decimal type in the array, add the m character after each number. For example: 0.001m.

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

See also:

IMath