NET/MASTER Network Control Language (NCL) Reference Manual
BOOLEXPR
Built-in Functions
106126 Tandem Computers Incorporated 4–23
In the following example, the value of &char1 is evaluated to determine if it is not
between the values of &char2 and &char3. The result is false, so NCL returns a value
of 0 (zero):
&char1 = b
&char2 = a
&char3 = c
&result = BOOLEXPR( "&char1 \= &char2:&char3" )
In the following example, the value of &num is evaluated to determine if it is between
1 and the value of &a. However, the value of &a is nonnumeric. This is a data error,
so NCL returns a value of BAD:
&a = "ABCD"
&num1 = 5
&result = BOOLEXPR( "&num = 1:&a" )
In the following example, the value of &a is evaluated to determine if it is strictly less
than ABCE (the letters in the right operand are converted to uppercase). The result is
true, so NCL returns a value of 1:
&a = "ABCD"
&result = BOOLEXPR( "&a << 'abce' FOLD" )
In the following example, the value of &a is evaluated to determine if it is either ABCD
or 5. The former is true, so NCL returns a value of 1:
&a = "ABCD"
&result = BOOLEXPR( "&a = 'abcd' FOLD OR &a = 5 NUMERIC" )
In the following example, the value of &a is evaluated to determine if it is both ABCD
and wxyz. The result is false, so NCL returns a value of 0 (zero):
&a = "ABCD"
&result = BOOLEXPR( "&a = 'abcd' FOLD AND",
"&a = 'wxyz' NOFOLD" )
In the following example, the value of &a is evaluated to determine if it is both ABCD
and 5. However, the value of &a on the right side of the AND Boolean operator
contains nonnumeric rather than numeric data. This is a data error, so NCL returns a
value of BAD:
&a = "ABCD"
&result = BOOLEXPR( "&a = 'abcd' FOLD AND &a = 5 NUMERIC" )
In the following example, the value of &a is evaluated to determine if is not equal to
ABCD and the result is inverted. The result is true, so NCL returns a value of 1:
&a = "ABCD"
&result = BOOLEXPR( "NOT &a \= 'ABCD'" )