Quality names may be combined together using Boolean operators into complex quality expressions. The quality expression is evaluated at each element within the NDF by substituting a value of true or false for each quality name used in the expression, depending on whether or not that element holds the specified quality. Elements are used if the quality expression evaluates to a true value. Boolean operators are delimited on each side by a period (e.g. .AND. ). The operands on which these operators act must be either a quality name (which must be defined within the NDF), or one of the Boolean constants .TRUE. and .FALSE. Parentheses can be used to nest expressions.
Quality expressions can be up to 254 characters long, and must not contain more than 40 symbols (Boolean operators, constants, or quality names). Some attempts are made to simplify a quality expression to reduce the run time needed to evaluate the expression for every data value.
The precedence of the Boolean operators decreases in the following order; .NOT., .AND., .OR., .XOR., .EQV. (the final two have equal precedence). In an expression such as ( A .XOR. B .EQV. C .XOR. D ) in which all operators have equal precedence, the evaluation proceeds from left to right, i.e. the expression is evaluated as ( ( ( A .XOR. B ) .EQV. C ) .XOR. D ). If there is any doubt about the order in which an expression will be evaluated, parentheses should be used to ensure the required order of evaluation.
KAPPA --- Kernel Application Package