This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Decrement

x--
decreases the value of x by 1, returning the old value of x.
Decrement the value of k by one, but return the old value:
Decrement the value of k by one, but return the old value:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Decrement a numerical value:
Decrement a symbolic value:
Decrement all values in a list:
Find the largest prime smaller than a given number:
Decrement and PreDecrement differ in the return value of the operation:
Decrement is a short form of this assignment:
Decrement is a special case of SubtractFrom:
Increment and PreIncrement are closely related operations:
A variable to be decremented must have an initial value:
New in 1