** Xtend IVR** scripting language supports the following operators.

Assigns value to a variable.

## Syntax

result=expression

Eg:

$A = 2.56

$A = $B

$A = "This is a test"

$A += 2

$A += $B

$A -= 2

$A -= $B

Used to perform arithmetic operations.

## Syntax

result = operand1 <operator> operand2

Parameters

operand 1: First operand to perform arithmetic operation.operand 2: Second operand to perform arithmetic operation.

Operands can be integer, floating point, constants, or variables. Xtend IVR supports both simple and complex arithmetic operations. Following are the arithmetic operators in Xtend IVR:

Used to find the sum of two numbers.

Eg:

$A = $A + 2

$A = $A + $B

Used to find the difference between two numbers or to indicate the negative value of a numeric expression.

Eg:

$A = $A - 2.5

$A = $A - $B

Used to multiply two numbers.

Eg:

$A = $A * 2.5

$A = $A * $B

Used to divide two numbers.

Eg:

$A = $A / 2

$A = $A / $B

Used to find the remainder after the division operation and returns an **integer** result.

Eg:

$A = $A % 2

$A = $A % $B

## Syntax

operand1 <operator> operand2

Operands can be integer, floating point, constants or variables. Description of the operators and their examples are listed as follows:

OperatorDescriptionExample>Greater than $A > $B , 10 > $A , $A > 10 <Less than $A < $B , 10 < $A , $A < 10 >=Greater than or equal to $A >= $B , 10 >= $A , $A >=10 <=Less than or equal to $A <= $B , 10 <= $A , $A <=10 <>Not equal to $A <> $B , 10 <> $A , $A <> 10 != Not equal to $A != $B , 10 != $A , $A != 10 =Equal to $A = $B , 10 = $A , $A = 10 ==Equal to $A == $B , 10 == $A , $A == 10

The comparison
operator **'='** is also used as an assignment operator. This ambiguity is
automatically resolved by the parser depending on the context of their use.

## Syntax

operand1 <operator> operand2

Bitwise operators supported by Xtend IVR and their descriptions are:

OperatorDescriptionExample&And $A & $B , $A & 20 ^Xor $A ^ $B , $A ^ 20 |Or $A | $B , $A | 10 >>Shift Right $A >> $B , $A >> 10 <<Shift Left $A << $B , $A << 10

## Syntax

expression1 <operator> expression2

Logical operators supported by Xtend IVR and their descriptions are:

OperatorDescriptionExample&&/.and./andLogical And ($A < $B) .and. ($A < $C) ||/.or./orLogical Or ($A<$B) or ($A=20) !/.not./notLogical Not !(5==5)