SIGN

 ──SIGN(number)───────────────

SIGN returns a number that indicates the sign of number. number is first rounded according to standard REXX rules, just as though the operation number+0 had been carried out. If number is less than 0, then -1 is returned; if it is 0 then 0 is returned; and if it is greater than 0, 1 is returned.

Here are some examples:

SIGN('12.3')       ->     1
SIGN(' -0.307')    ->    -1
SIGN(0.0)          ->     0


[Back: SETLOCAL]
[Next: SOURCELINE]