Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
kamen69255yDoesn't really matter unless you assign that to another variable at the same time (and you probably shouldn't do that anyway).
-
Hazarth95065yWhen paid for number of lines:
x = x.getCounter()
.add(new Number()
.setValue(1)
)
); -
@s0LA
every time we x++/++x/--x/x-- we change the value of x (before or after using its value, depending if the sings are before or after the variable) and has to be taken into account for the remainder of the calculation
x += (++x - x--) + ++x + ++x - 2 * --x
x += ++x + ++x - 2 * --x;
x += (x+1) + (x +1 + 1) - 2 * (x +1 + 1 - 1)
x += 2x - 2x + 3 - 2
x += 1
is it confusing? yes, try to avoid complex sentences with those :P
Related Rants
Increment
joke/meme
joke
meme
random