NET/MASTER Network Control Language (NCL) Reference Manual

BITAND, BITOR, and BITXOR
Built-in Functions
106126 Tandem Computers Incorporated 4–9
BITAND, BITOR, and
BITXOR
The BITAND, BITOR, and BITXOR built-in functions perform, respectively, logical
AND, OR, and exclusive OR (XOR) operations on two strings. See “Considerations,”
next, for a definition of these terms.
BITAND(
string1
[, [
string2
] [,
pad
] ] )
BITOR(
string1
[, [
string2
] [,
pad
] ] )
BITXOR(
string1
[, [
string2
] [,
pad
] ] )
BITAND
performs a logical AND operation on the strings.
BITOR
performs a logical OR operation on the strings.
BITXOR
performs a logical exclusive OR (XOR) operation on the strings.
string1
specifies the first string for input to the logical operation.
string2
specifies the second string for input to the logical operation. If omitted, a null
string is assumed.
pad
specifies the optional character to be used to pad the resulting output string. If
omitted or null, the remaining characters of the longest string are appended to the
resulting output string.
Considerations
If both strings are null, a null string is returned.
The input strings are treated as bit strings. The resulting output string is as long as
the longest input string.
If no pad character is provided, the resulting output string consists of the logical
result of the two input strings for the shortest length. The remaining, unprocessed
part of the longer input string is appended. If a pad character is provided, it is
used to pad the shorter input string before starting the operation.