52 Citrix NetScaler Policy Configuration and Reference Guide

Arithmetic Operations for Compound Advanced Expressions

Operator

Description

 

 

number.GT

Return a Boolean TRUE if the number value is greater than the

(integer)

integer argument.

 

Following is an example:

 

http.req.content_length.gt(500)

number.LE

Return a Boolean TRUE if the number value is less than or equal to

(integer)

the integer argument.

 

Following is an example:

 

http.req.content_length.le(5)

number.LT

Return a Boolean TRUE if the number value is less than the integer

(integer).

argument.

 

Following is an example:

 

http.req.content_length.lt(5)

number.NEG

Returns a number after negating the current number value.

 

Following is an example:

 

http.req.content_length.neg

number.BITAND

Returns a number after applying a bitwise AND to the integer

(integer)

argument and the current number value.

 

A bitwise AND operates on each pair of corresponding bits,

 

returning 1 if both of the bits contains a value of 1, and 0 if either bits

 

are 0. The following example assumes that numeric.expression

 

returns 12 (binary 1100):

 

numeric.expression.bitand(10)

 

The binary value of 10 is 1010, and the result of applying the

 

BITAND operator to the whole expression is 8 (binary 1000).

 

The following is another example of an expression that uses a

 

BITAND. Assume that the expression prior to the BITAND returns a

 

value of 8:

 

http.req.header(\"test\").contains_index(\"pat1\"

 

).bitand(4)

 

The result of this expression is 0.

 

An ampersand (&) performs a similar function to BITAND, 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.

 

 

Page 66
Image 66
Citrix Systems 9.2 Number .LE, Integer Integer argument Following is an example, Number .LT, Result of this expression is