4 ms·
Was never a thing? It's: c -= 1; // c decremented by 1 Notice the order is different.
by dale_glass 4y ago
Was never a thing?
It's:
c -= 1; // c decremented by 1
Notice the order is different.
- m463 4y agosorry, it was a longer time ago than I realized: Compound assignment operators of the form =op (such as =-) were changed to the form op= (that is, -=) to remove the semantic ambiguity created by constructs such as i=-10, which had been interpreted as i =- 10 (decrement i by 10) instead of the possibly intended i = -10 (let i be −10). https://en.wikipedia.org/wiki/C_(programming_language)#K&R_C https://en.wikipedia.org/wiki/C_(programming_language)#K&R_C
- taylodl 4y agoYeah - it goes back prior to 1978!