Returns a 1, -1, or 0, indicating whether the specified value is positive, negative, or zero, respectively.
SIGN(x)
x is an arithmetic expression.
The SIGN function returns a 1, -1, or 0, indicating whether x is positive, negative, or zero, respectively.
The precision of the result is Fixed Binary(15) unless the -bifprec compiler option overrides it.
IF SIGN(X) = 1 THEN PUT LIST ('SIGN OF X IS POSITIVE');
None.
Description
The SIGN function returns a 1, -1, or 0, indicating whether x is positive, negative, or zero, respectively.
The precision of the result is Fixed Binary(15) unless the -bifprec compiler option overrides it.