NET/MASTER Network Control Language (NCL) Reference Manual
BOOLEXPR
Built-in Functions
4–12 106126 Tandem Computers Incorporated
BOOLEXPR The BOOLEXPR built-in function analyzes or evaluates a complex Boolean expression.
The expression can be analyzed for syntactic correctness or completely evaluated, after
which the logical result is made available. You can supply the values either directly
(using quoted strings) or indirectly (using variables).
The expression syntax supports the full use of the AND, OR, and NOT Boolean
operators, and the simple and strict relational operators. You can use parentheses (( ))
to group expressions and to alter the order in which expressions are evaluated. There
is no limit to the complexity of the expression or the nesting of parentheses.
One of the following values is returned by this built-in function: VALID (expression is
valid), INVALID (expression is invalid), BAD (expression has bad data), 0 (zero;
expression is false), or 1 (expression is true). See “Considerations,” next, for a detailed
description of these values.
BOOLEXPR(
expr
[, [
subchar
]
[, [ { EVAL | NOEVAL } ]
[, { FOLD | NOFOLD } ] ] ] )
expr
:
[ NOT … ] {
expr
| (
expr
) |
test
}
[ [ AND [ NOT … ] {
expr
| (
expr
) |
test
} ] … ]
[ [ OR
[ NOT … ] {
expr
| (
expr
) |
test
}
[ [ AND [ NOT … ] {
expr
| (
expr
) |
test
} ] … ]
] … ]
test
:
[ IGNORE { TRUE | FALSE } ]
[ ANY | ALL ]
left_operand
[ [,
left_operand
] … ]
operator
[ ANY | ALL ]
right_operand
[ [,
right_operand
] … ]
left_operand
:
{
constant
|
variable
|
number
}
operator
:
= < <= == << <<= CONTAINS IS [ NOT ]
\= > >= \== >> >>= LIKE
right_operand
:
{
constant
|
variable
|
number
}
[ GENERIC | :{
constant
|
variable
|
number
} ]
[ { CHARACTER | NUMERIC | { FOLD | NOFOLD } } … ]
[
type_name
[ [,
type_name
] … ] ]