Language Element | Short Description |
---|---|
Addition Assignment Operator (+=) | Adds the value of an expression to the value of a variable and assigns the result to the variable. |
Bitwise AND Assignment Operator (&=) | Performs a bitwise AND on the value of a variable and the value of an expression and assigns the result to the variable. |
Bitwise OR Assignment Operator (|=) | Performs a bitwise OR on the value of a variable and the value of an expression and assigns the result to the variable. |
Bitwise XOR Assignment Operator (^=) | Performs a bitwise exclusive OR on a variable and an expression and assigns the result to the variable. |
Division Assignment Operator (/=) | Performs a division on the value of a variable and the value of an expression and assigns the result to the variable. |
Left Shift Assignment Operator (<<=) | Left shifts the value of a variable by the number of bits specified in the value of an expression and assigns the result to the variable. |
Modulus Assignment Operator (%=) | Divides the value of a variable by the value of an expression, and assigns the remainder to the variable. |
Multiplication Assignment Operator (*=) | Performs a multiplication on the value of a variable and the value of an expression and assigns the result to the variable. |
Right Shift Assignment Operator (>>=) | Right shifts the value of a variable by the number of bits specified in the value of an expression, maintaining the sign, and assigns the result to the variable. |
Subtraction Assignment Operator (-=) | Performs a subraction on the value of a variable and the value of an expression and assigns the result to the variable. |
Unsigned Right Shift Assignment Operator (>>>=) | Right shifts the value of a variable by the number of bits specified in the value of an expression, without maintaining sign, and assigns the result to the variable. |
Adds the value of an expression to the value of a variable and assigns the result to the variable.result += expressionArguments
resultAny variableexpressionUsing this operator is exactly the same as specifying: result = result + expressionAny expression
Performs a bitwise AND on the value of a variable and the value of an expression and assigns the result to the variable.result &= expressionArguments
resultAny variable.expressionUsing this operator is exactly the same as specifying: result = result & expressionAny expression
Performs a bitwise OR on the value of a variable and the value of an expression and assigns the result to the variable.result |= expressionArguments
resultAny variableexpressionUsing this operator is exactly the same as specifying: result = result | expressionAny expression
Performs a bitwise exclusive OR on a variable and an expression and assigns the result to the variable.result ^= expressionArguments
resultAny variable.expressionUsing the ^= operator is exactly the same as specifying: result = result ^ expressionAny expression.
Performs a division on the value of a variable and the value of an expression and assigns the result to the variable.result /= expressionArguments
resultAny variableexpressionUsing this operator is exactly the same as specifying: result = result / expressionAny expression
Left shifts the value of a variable by the number of bits specified in the value of an expression and assigns the result to the variable.result <<= expressionArguments
resultAny variable.expressionUsing the <<= operator is exactly the same as specifying: result = result << expressionAny expression.
Divides the value of a variable by the value of an expression, and assigns the remainder to the variable.result %= expressionArguments
resultAny variableexpressionUsing the %= operator is exactly the same as specifying: result = result % expressionAny expression
Performs a multiplication on the value of a variable and the value of an expression and assigns the result to the variable.result *= expressionArguments
resultAny variableexpressionUsing this operator is exactly the same as specifying: result = result * expressionAny expression
Right shifts the value of a variable by the number of bits specified in the value of an expression, maintaining the sign, and assigns the result to the variable.result >>= expressionArguments
resultAny variable.expressionUsing the >>= operator is exactly the same as specifying: result = result >> expressionAny expression.
Performs a subraction on the value of a variable and the value of an expression and assigns the result to the variable.result -= expressionArguments
resultAny variableexpressionUsing this operator is exactly the same as specifying: result = result - expressionAny expression
Right shifts the value of a variable by the number of bits specified in the value of an expression, without maintaining sign, and assigns the result to the variable.result >>>= expressionArguments
expressionUsing the >>>= operator is exactly the same as specifying: result = result >>> expressionAny expression.