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

PreDecrement

--x
decreases the value of x by 1, returning the new value of x.
  • --x is equivalent to .
Decrement the value by one and return the new value:
Decrement the value by one and return the new 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 first integer below one million with a certain property:
Decrement and PreDecrement differ in the return value of the operation:
PreDecrement is a short form of this assignment:
PreDecrement 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