NET/MASTER Network Control Language (NCL) Reference Manual

BOOLEXPR
Built-in Functions
4–22 106126 Tandem Computers Incorporated
In the following example, the tilde (~) is used as the variable designator and a wild
card (%) is used to match zero or more characters. The value of &a is evaluated to
determine if its first character is A and its last character is D (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 LIKE 'a%d'", "~", E, F )
In the following example, the value of &a is evaluated to determine if its first character
is A and its third character is C (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 LIKE 'a_c_' FOLD" )
In the following example, the value of &a is evaluated to determine if it begins with
‘ ABCD ’. The result is true, so NCL returns a value of 1:
&a = " ABCD "
&result = BOOLEXPR( "&a = ' ABCD ' GENERIC" )
In the following example, the value of &a is evaluated to determine if it begins with
‘ ABCD ’. The result is true, but the IGNORE FALSE operands direct NCL to return a
false result of 0 (zero):
&a = " ABCD "
&result = BOOLEXPR(IGNORE FALSE "&a = ' ABCD ' GENERIC" )
In the following example, the value of &a is evaluated to determine if it begins with
‘ ABCD ’. The result is false, so NCL returns a value of 0 (zero):
&a = " ABCD "
&result = BOOLEXPR( "&a = ' ABCDE ' GENERIC" )
In the following example, the value of &a is evaluated to determine if it begins with
‘ ABCD ’. The result is false,, but the IGNORE TRUE operands direct NCL to return a
true result of 1:
&a = " ABCD "
&result = BOOLEXPR(IGNORE TRUE "&a = ' ABCDE ' GENERIC" )
In the following example, the value of &num1 is evaluated to determine if it is
between the values of &num2 and &num3. The result is true, so NCL returns a value
of 1:
&num1 = 5
&num2 = 6
&num3 = 4
&result = BOOLEXPR( "&num1 = &num2:&num3" )