NET/MASTER Network Control Language (NCL) Reference Manual

BOOLEXPR
Built-in Functions
106126 Tandem Computers Incorporated 4–25
The following example shows a complex Boolean expression. The tilde (~) is used as
the variable designator by use of the subchar clause. The ampersand (&), vertical bar
(|), and backslash (\) represent the AND, OR, and NOT operators, respectively. The
result after evaluation is true, so NCL returns a value of 1:
&a = "ABCD"
&b = "25-dec-1993"
&c = "efgh"
&types = "date1,date2,date3"
&d = "123"
&e = "OK"
&result = BOOLEXPR( "( ( ~a = 'abcd' FOLD | ",
"~a = 'wxyz' ) & ",
"( \ ~a = 'qqqq' & ",
"ANY ~a,~b,~c CONTAINS 'bc' FOLD & ",
"~a IS ALNUMNAT ) & ",
"( ~b IS ~types ) & ",
"( ~d = '12' GENERIC ) ) | ",
"( ( \ \ \ \ \ ~e \= 'OK' ) & ",
"~d = 124:122 )", "~",, FOLD )