Abs

This function calculates the absolute value of a number.

Syntax

Abs(number)

Parameters

number
Any valid numeric expression. If number contains Null, Null is returned. If it is an uninitialized variable, 0 is returned.

Return Values

Returns the absolute value of its parameter. Abs returns the same variant type as the numeric expression that was passed to it: Integer, Single, or Double.

Remarks

The absolute value of number is the number without its sign. For example, Abs(–1) and Abs(1) both return 1.