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[]
Example[]
Spike
got one less
.
There was one less
cider
.
I would
subtract
Spike
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[]
Phrases (list) | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|