Oh, sorry I assumed you already knew about those. Yes, *= is equivalent to * first then = second.
They are called compound assignment operators: +=, -=, *=, /=, %=, >>=, <<=, ^=, |=, &=.
They are used for shorthand notation, like:
1 2 3
|
i = i + j;
//Equivalent to
i += j;
|
For even shorter notations, there are the increment and decrement operators: ++ and --.
1 2 3
|
i = i - 1;
i -= 1;
--i;
|
There is also a difference between ++i (prefix) and i++ (postfix). ++i increments i by one and returns i. i++ increments i,
but returns what i was before incrementing. The same is true for --i and i--.