NET/MASTER Network Control Language (NCL) Reference Manual
BOOLEXPR
Built-in Functions
106126 Tandem Computers Incorporated 4–17
You can specify either single quotes (' ') or double quotes (" "). You
can represent an occurrence of the quote character in the value by
using two adjacent quote characters of the same type or by using the
alternate quote character to surround the value.
variable
specifies a variable. If a variable is compared to a number and the
variable value is either null or nonnumeric, the result after evaluation
is BAD. You can use the
subchar
operand to specify a variable
designator other than the ampersand (&).
number
specifies a number. You must omit quotes from a number. If a
variable is compared to a number and the variable value is either null
or nonnumeric, the result after evaluation is BAD.
GENERIC
specifies a generic comparison. This checks whether the value of the
left operand begins with the same characters as the right operand.
The GENERIC modifier is permitted only with a quoted constant or
variable to the right of an operator, and only for the equal (=) and not
equal (\=) operators.
The GENERIC modifier is invalid when used with the NUMERIC
modifier.
:{
constant
|
variable
|
number
}
specifies a range test. This checks whether the value of the left
operand is between the two values (separated by a colon (:)) specified
by the right operand.
The range test is permitted only with the equal and not equal
operators. Both sides of the range must be the same type; you cannot
specify both a constant and a number. If one side of the range is
numeric and the other is a variable, then the variable must have a
numeric value; otherwise, the result after evaluation is BAD.
For convenience, if the “to” range value is greater than the “from”
range value, the values are reversed before evaluation rather than
raising an error.
CHARACTER
specifies a character comparison. This is required only when
comparing a variable to another variable. This avoids the default
action of testing both sides for numeric values and performing a
comparison based on the result.