Binary Operator Shorthands — (+=, -=,
*=, /=,
%=, &=,
^=, <<=,
>>=)
symbol += number
symbol -= number
symbol *= number
symbol /= number
symbol %= number
symbol &= number
symbol ^= number
symbol <<= number
symbol >>= number
symbolA symbol with a numeric value.
numberAny integer or real number.
The value of the symbol as operated on with the
number.
These operators provide a shorthand way of reassigning values to symbols.
+= gives the sum of the symbol and the
number.
-= gives the difference between the symbol and the
number.
*= gives the product of the symbol and the
number.
/= gives the symbol divided by the
number.
% gives the modulus of the symbol by the
number, that is, the remainder of the integer
division of the symbol by the
number.
&= performs the & operation on the
symbol and the
number.
^= performs the ^ operation on the
symbol and the
number.
<<= performs the << operation on the
symbol and the
number.
>>= performs the >> operation on the
symbol and the
number.
Gamma>a = 5;5Gamma>a += 8;13Gamma>a;13Gamma>