NET/MASTER Network Control Language (NCL) Reference Manual

SIGN
Built-in Functions
4–74 106126 Tandem Computers Incorporated
SIGN The SIGN built-in function tests the specified number and indicates if it is positive,
negative, or 0 (zero).
SIGN(
number
)
number
specifies the number to be tested. If the number is negative, a minus one (-1) is
returned. If the number is 0, 0 (zero) is returned. If the number is positive, 1 is
returned.
Example
In the following example, 12.34 is tested to determine if it is positive, negative, or 0
(zero). The number is positive, so 1 is returned:
&A = 12.34
&RESULT = SIGN(&A)