%ABS

Return the absolute value of an expression

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
absolute = %ABS(number)

Return value

absolute

The absolute value of the specified numeric expression. The result has the same data type as number. (n)

Arguments

number

A numeric expression whose absolute value is returned. (n)

Examples

If your algorithm uses the equation

y = |x - 3|

you would code it as follows:

y = %abs(x - 3)