Re:What is the name of this operator: “--”?
by stephen_g on Monday October 22, 2012 @11:04PM
(#4686537)
Basically, somebody sees some code with two operators (decrement and less than) with no whitespace between them and thinks it's a single operator.
The answer that shows it with the brackets is probably the clearest:
while ((x--) > 0)
{ ... }
The compiler sees that as the same as (x--> 0)So it checks if x is more than zero and then decrements it each loop iteration.
[1]: http://stackoverflow.com/questions/1642028/what-is-the-name-...