Short tab Syntax Buttons
The Short tab syntax buttons indicate all the ways you can add or modify a short in an expression in a Cisco Unified CCX script. Clicking on one of the buttons adds the indicated syntax (minus the question marks) to your expression. In the spaces left by the question marks, enter the appropriate values.
The semantics of arithmetic operations exactly mimic those of Java’s Long 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 |
---|---|---|---|
(short)? |
short typecast |
typecast |
Assigns the operand a short type. This means a variable of type Integer, byte, and so on can be converted to a short type. The rule of the type casting is the same as in Java. See also Integer Literals. 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. |
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. |