ABS( ) Function

Returns the absolute value of the specified numeric expression.

ABS(nExpression)

Return Values

Numeric

Parameters

  • nExpression
    Specifies the numeric expression whose absolute value ABS( ) returns.

Example

? ABS(-45)       && Displays 45
? ABS(10-30)     && Displays 20
? ABS(30-10)     && Displays 20
STORE 40 TO gnNumber1
STORE 2 TO gnNumber2
? ABS(gnNumber2-gnNumber1)     && Displays 38

See Also

INT( ) Function | ROUND( ) Function | SIGN( ) Function