I l @ ve RuBoard |
= assigns the value at its right to the lvalue on its left.
Each of the following assignment operators updates the lvalue at its left by the value at its right, using the indicated operation. We use R-H for right-hand and L-H for left-hand.
+= adds the R-H quantity to the L-H variable and places the result in the L-H variable.
-= subtracts the R-H quantity from the L-H variable and places the result in the L-H variable.
*= multiplies the L-H variable by the R-H quantity and places the result in the L-H variable.
/= divides the L-H variable by the R-H quantity and places the result in the L-H variable.
%= gives the remainder from dividing the L-H quantity by the R-H quantity and places the result in the L-H variable.
&= assigns L-H & R-H to the L-H quantity and places the result in the L-H variable.
= assigns L-H R-H to the L-H quantity and places the result in the L-H variable.
^= assigns L-H ^ R-H to the L-H quantity and places the result in the L-H variable.
>>= assigns L-H >> R-H to the L-H quantity and places the result in the L-H variable.
<<= assigns L-H << R-H to the L-H quantity and places the result in the L-H variable.
rabbits *= 1.6; is the same as rabbits = rabbits * 1.6;
I l @ ve RuBoard |