Abs Function

Language Items List

Definition:

Returns the absolute value of a number.

Syntax:

Abs(number)


Syntax Description


number Any valid numeric expression.

Details:

Abs returns the absolute, or unsigned, value of the argument number. For example, Abs(-1) and Abs(1) both return 1.The return value's data type is the same as the number argument's data type.

See Also:

Sgn

Example:

If (Abs(x) = x) Then Print
x is positive