User`s manual

Dynamic C Users Manual digi.com 235
13.2 Assignment Operators
Assignment. This binary operator causes the value of the right operand to be assigned to the left operand.
Assignments can be “cascaded” as shown in this example.
a = 10 * b + c; // a gets the result of the calculation
a = b = 0; // b gets 0 and a gets 0
Addition assignment.
a += 5; // Add 5 to a. Same as a = a + 5
Subtraction assignment.
a -= 5; // Subtract 5 from a. Same as a = a - 5
Multiplication assignment.
a *= 5; // Multiply a by 5. Same as a = a * 5
Division assignment.
a /= 5; // Divide a by 5. Same as a = a / 5
Modulo assignment.
a %= 5; // a mod 5. Same as a = a % 5
Left shift assignment.
a <<= 5; // Shift a left 5 bits. Same as a = a << 5
=
+=
-=
*=
/=
%=
<<=