Mathematica > Core Language > Defining Variables and Functions > Assignments > Increment (++) >

Increment

x++
increases the value of x by 1, returning the old value of x.
Increment the value by one, and return the old value:
Increment the value by one, and return the old value:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Increment a numerical value:
Increment a symbolic value:
Increment all values in a list:
Find the first integer with a certain property:
Increment and PreIncrement differ only in the return value of the operation:
Increment is a short form of this assignment:
Increment is a special case of AddTo:
Decrement and PreDecrement are closely related operations:
A variable to be incremented must have an initial value:
New in 1
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF