Navigation:  Language Reference > 13 - Built-in Functions >====== ABS (return absolute value) ====== Previous pageReturn to chapter overviewNext page

ABS(expression)

blk2blue.jpg

ABS Returns absolute value.
expression A constant, variable, or expression.

The ABS procedure returns the absolute value of an expression. The absolute value of a number is always positive (or zero).

Return Data Type: REAL or DECIMAL

Example:

C = ABS(A - B)              !C is absolute value of the difference

IF B <; 0

B = ABS(B)                 !If b is negative make it positive

END

See Also:

BCD Operations and Procedures