The increment operator is a special case of addition, and adds the fixed value 1
to a variable. This cannot be used on literals or constant variables. This operator is a single instruction by itself and can only be used on one variable at a time.
FDS[]
-
- Increases the given variable by 1 and returns the variable's previous value.
-
- Increases the given variable by 1 and returns the variable's new value.
-
- Increases the given variable by the value of the given number.
Example[]
FiM
got one more
.
There was one more
Pinkie Pie
.
add
15
to
Pinkie Pie
.
This adds 1
to the variable FiM
and then to Pinkie Pie
, and then adds 15
to Pinkie Pie
.
Its Java equivalent is as follows:
FiM++;
++PinkiePie;
PinkiePie += 15;
See Also[]
Phrases (list) | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|