x + 5 notation considered harmful!
The term
Code: Select all
x+5
Code: Select all
x += 5
But actually it is a hidden macro and the compiler will expand it to x = x + 5.
The importance of the difference can be seen is this example:
Code: Select all
some_array( Random(42) ) + 1
But it will expand to
Code: Select all
some_array( Random(42) ) = some_array( Random(42) ) + 1
Which will instead add the content of a randomly determined other slot with 1 and assign that.
So, in the first case, it is not a relevant shortening of the code to write x + 5 instead of x = x + 5.
If you have some complex expression, then it might be shorter, but just then it is dangerous to use.
Overall conclusion is to avoid it just like goto.