NET/MASTER Network Control Language (NCL) Reference Manual
Relational Operators and Expressions
Expressions and Operators
10–14 106126 Tandem Computers Incorporated
Overflow and Underflow
An overflow error occurs if the size of a number is too large to be represented: that is,
outside ±1.15792089237161e77.
An underflow error occurs if the size of a number is too close to 0 (zero) to be
represented: that is, inside ±8.63616855509445e-78.
You can use the ON statement with either the general ERROR handler or the specific
ARITH_ERROR handler to trap overflow and underflow errors.
Division by 0 (Zero)
An attempt to divide by 0 (zero) causes an error. You can use the ON statement with
either the general ERROR handler or the specific ARITH_ERROR handler to trap this
error.
Relational Operators
and Expressions
This subsection describes relational operators and relational expressions.
Relational Operators Relational operators compare the left term to the right term in an expression and
return either 1 if the relation is true or 0 (zero) if the relation is false. There are two
classes of relational operators: simple and strict.
Simple Relational Operators
Simple relational operators strip all leading and trailing blanks from both terms before
making the comparison. In addition, if both terms are valid numbers, a numeric
comparison is performed. If either is not a number, a character comparison (with
blank padding at the end of the shorter term) is performed. The terms are not
converted to uppercase letters.
Table 10-3 lists the simple relational operators. All operators have the same level of
precedence.
Table 10-3. Simple Relational Operators
Operator Operation Comment
= Simple equal to Performs a simple test of equality.
\= Simple not equal to Performs a simple test of non-equality.
< Simple less than Performs a simple less than test.
> Simple greater than Performs a simple greater than test.
<= Simple less than or equal to Performs a simple less than or equal to test.
>= Simple greater than or equal to Performs a simple greater than or equal to test.
Note For the sake of efficiency, use the simple equal sign (=) when comparing numeric terms.