abs()

The mathLib.abs() system function returns the absolute value of a number.

Syntax

  mathLib.abs(numericVariable SMALLINT | INT | 
               BIGINT | DECIMAL | SMALLFLOAT | FLOAT in)
  returns (result SMALLINT | INT | BIGINT | 
               DECIMAL | SMALLFLOAT | FLOAT)
numericVariable
Input can be any numeric variable or expression with one of the types shown.
result
The absolute value of numericVariable is returned as the same type as numericVariable.

Example

runningBalance, result SMALLFLOAT;

  runningBalance = -5.00;
  result = mathLib.abs(runningBalance);  // result = 5.0

Feedback