Increment

x++

increases the value of x by 1, returning the old value of x.

Details

Examples

open allclose all

Basic Examples  (1)

Increment the value by one, and return the old value:

Scope  (3)

Increment a numerical value:

Increment a symbolic value:

Increment all values in a list:

Applications  (1)

Find the first integer with a certain property:

Properties & Relations  (4)

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:

Possible Issues  (1)

A variable to be incremented must have an initial value:

Introduced in 1988
 (1.0)