54 Citrix NetScaler Policy Configuration and Reference Guide
number.BITXOR
(integer)Returns a number after applying a bitwise XOR to the integer
argument and the current number value. If the values in the bitwise
comparison are the same, the returned value is a 0. The following
example assumes that numeric.expression returns 12 (binary 1100):
numeric.expression.bitxor(10)
The binary value of 10 is 1010, and the result of applying the
BITXOR operator to the entire expression is 6 (binary 0110).
The following is another example of an expression that uses a
BITXOR. Assume that the expression prior to the BITXOR returns a
value of 8:
http.req.header(\"test\").contains_index(\"pat1\"
).bitxor(8)
The result of this expression is 0.
A caret (^) performs a similar function to BITXOR, but takes
another expression as an argument rather than an integer.
Note that all returned values of less than 32 bits before applying the
operator implicitly have zeros to the left to make them 32 bits wide.
number.LSHIFT
(integer)Returns a number after a bitwise left shift of the number value by the
integer argument number of bits.
Note that the number of bits shifted is integer modulo 32. The
following example assumes that numeric.expression returns 12
(binary 1100):
numeric.expression.lshift(3)
The result of applying the LSHIFT operator is 96 (a binary
1100000).
The following is another example of an expression that uses an
LSHIFT. Assume that the expression prior to the LSHIFT returns a
value of 8:
http.req.header(\"test\").contains_index(\"pat1\"
).lshift(2)
The result of this expression is 32.
A double less-than (<<) performs a similar function to LSHIFT, but
takes another expression as an argument rather than an integer.
Note that all returned values of less than 32 bits before applying the
operator implicitly have zeros to the left to make them 32 bits wide.
Arithmetic Operations for Compound Advanced Expressions
Operator Description