BigInteger tab Syntax Buttons
The BigInteger tab syntax buttons indicate all the ways you can add or modify a BigInteger in an expression in a Cisco Unified CCX script. Clicking on one of the buttons adds the indicated syntax to your expression. The Question marks are not added to the expression when you click the syntax button. You need to substitute them with the appropriate values in the expression.
Note | All of the BigInteger syntax listed in table is specific to the Cisco Unified CCX Expression Language. The use of IB to specify a BigInteger and the use of math operators on BigIntegers is specific to the Expression Language and is not a part of the Java language syntax. |
The semantics of arithmetic operations exactly mimic those of Java’s integer arithmetic operators, as defined in The Java Language Specification. See the following for a summary descriptive list of all the operators you can use in the Java language:
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/opsummary.html
Syntax Button |
Name |
Type |
Description |
---|---|---|---|
?IB |
literal |
decimal |
A BigInteger literal in decimal format. For example:
|
0x?IB |
literal |
hexadecimal |
A BigInteger literal in hexadecimal format. For example:
|
+? |
unary plus |
unary |
The positive value of the operand. |
-? |
unary minus |
The negative value of the operand. | |
++? |
prefix increment |
increment |
Increments the value of the operand by one before the operand is changed in an expression. |
?++ |
postfix increment |
Increments the value of the operand by one after the operand is changed in an expression. | |
--? |
prefix decrement |
decrement |
Decrements the value of the operand by one before the operand is changed in an expression. |
?-- |
postfix decrement |
Decrements the value of the operand by one after the operand is changed in an expression. | |
? + ? |
addition |
arithmetic |
Adds two operands. |
? - ? |
subtraction |
Subtracts the second operand from the first. | |
? * ? |
multiplication |
Multiplies two operands. | |
? / ? |
division |
Divides the first operand by the second. | |
? % ? |
remainder |
Returns the remainder of the first operand divided by the second. | |
? << ? |
shift left |
bitwise shift (for operations on individual bits in integers only) |
Shifts bits of operand 1 left by the distance of operand 2; fills with zero bits on the right-hand side. |
? >> ? |
shift right |
Shifts bits of operand 1 right by the distance of operand 2; fills with the highest (signed) bit on the left-hand side. | |
? >>> ? |
zero fill right shift |
Shifts bits of operand 1 right by a distance of operand 2; fills with zero bits on the left-hand side. | |
? & ? |
bitwise AND |
bitwise logical (for operations on individual bits in integers only) |
Compares both operands. If both operand bits are 1, the AND function sets the resulting bit to 1; otherwise, the resulting bit is 0. |
? ^ ? |
bitwise exclusive OR (XOR) |
Compares both operands. If both operand bits are different, the resulting bit is 1; otherwise the resulting bit is 0. | |
? | ? |
bitwise inclusive OR |
Compares both operands. If either of the two operand bits is 1, the resulting bit is 1. Otherwise, the resulting bit is 0. | |
~ ? |
Bitwise complement |
Inverts the value of each operand bit: If the operand bit is 1, the resulting bit is 0; if the operand bit is 0, the resulting bit is 1. | |
? *= ? |
multiply and assign |
assignment The operand on the left of the assignment statement (the first operand) can be any type of variable, including an array component or a public class attribute. Assignment (continued) |
Multiplies the first operand by the second and assigns the result to the first operand. |
? /= ? |
divide and assign |
Divides the first operand by the second and assigns the result to the first operand. | |
? %= ? |
remainder and assign |
Divides the first operand by the second operand and assigns the remainder to the first operand. | |
? += ? |
add and assign |
Adds the first operand to the second operand and assigns the result to the first operand. | |
? -= ? |
subtract and assign |
Subtracts the second operand from the first operand and assigns the result to the first operand. | |
? <<= ? |
left shift and assign |
Shifts bits of operand 1 left by the distance of operand 2; fills with zero bits on the right-hand side and assigns the resulting bit to operand 1. | |
? >>= ? |
right shift and assign |
Shifts bits of operand 1 left by the distance of operand 2; fills with zero bits on the right-hand side and assigns the resulting bit to operand 1. | |
? >>>= ? |
zero fill, right shift, and assign |
Shifts bits of operand 1 right by a distance of operand 2; fills with zero bits on the left-hand side and assigns the resulting bit to operand 1. | |
? &= ? |
AND and assign |
First, compares both operands. If both operand bits are 1, the AND function sets the resulting bit to 1; otherwise, the resulting bit is set to 0. Then, assigns the resulting bit to operand 1. | |
? ^= ? |
XOR and assign |
First, compares both operands. If both operand bits are different, the resulting bit is 1; otherwise the resulting bit is 0. Then, assigns the resulting bit to operand 1. | |
? |= ? |
OR and assign |
First, compares both operands. If either of the two operand bits is 1, the resulting bit is 1. Otherwise, the resulting bit is 0. Then, assigns the resulting bit to operand 1. |
Note | The operand for the prefix increment and decrement as well as postfix increment and decrement operators must be a variable, an array component, or a public class attribute. |