AbsD(Value: Decimal): Decimal;
Value. High-precision decimal number, which absolute value must be found.
The AbsD method returns the absolute value (module) of a high-precision decimal number.
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.
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.
See also: