Previous Topic: BuiltIn FunctionsNext Topic: $ACCOUNTID Function


$ABS Function

$ABS returns the absolute value of a numeric expression.

This function has the following format:

$ABS (numeric‑expression)

The absolute value of the expression is returned. $ABS(X) is defined as follows:

If X<0, $ABS(X) is ‑X; else $ABS(X) is X.

Example

SET I = $ABS(J)     :If J is 6, I is 6.
                    :If J is ‑6, I is 6.