FANDOM


The decrement operator is a special case of subtraction, and subtracts the a number from a variable. This cannot be used on literals or constants. This operator is a single instruction by itself and can only affect one variable at a time.

FDS Edit

Example Edit

Spike got one less.
Icon Warning There was one less cider.
I would Icon Warning subtract Spike Icon Warning from cider.

This subtracts 1 from the variable Spike and then from cider, and then subtracts Spike from cider.

Its Java equivalent is as follows:

Spike--;
--cider;
cider -= Spike;

See Also Edit


Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.