Assignment with Operator

Phix also provides some additional forms of the assignment statement.

To save typing, and to make your code a bit neater, you can combine assignment with one of the operators:
         + - / * &
For example, instead of saying:
   mylongvarname = mylongvarname + 1
You can say:
   mylongvarname += 1
Instead of saying:
   galaxy[q_row][q_col][q_size] = galaxy[q_row][q_col][q_size] * 10
You can say:
   galaxy[q_row][q_col][q_size] *= 10
and instead of saying:
   accounts[start..finish] = accounts[start..finish] / 10
You can say:
   accounts[start..finish] /= 10
In general, whenever you have an assignment of the form:
    left-hand-side = left-hand-side op expression
 
You can say:
    left-hand-side op= expression
 
where op is one of:    +   -   *   /   &

When the left-hand-side contains multiple subscripts/slices, the op= form will usually execute faster than the longer form. When you get used to it, you may find the op= form to be slightly more readable than the long form, since you do not have to visually compare the left-hand-side against the copy of itself on the right side.

Note the explicit assignment ':=' operator does not have any assignment with operator forms since the latter are already explicit assignment operations anyway.