++x
increases the value of x by 1, returning the new value of x.


PreIncrement 
++x
increases the value of x by 1, returning the new value of x.
Details

- ++x is equivalent to x=x+1.
- PreIncrement has attribute HoldFirst.
- In PreIncrement[x], x can be a symbol or other expression with an existing value. »
Examples
open all close allScope (4)
Increment all values in a list:
The argument to PreIncrement need not be a symbol:
Properties & Relations (4)
Increment and PreIncrement differ in the return value of the operation:
PreIncrement is a short form of this assignment:
PreIncrement is a special case of AddTo:
Decrement and PreDecrement are closely related operations:
See Also
Tech Notes
Related Guides
History
Introduced in 1988 (1.0)
Text
Wolfram Research (1988), PreIncrement, Wolfram Language function, https://reference.wolfram.com/language/ref/PreIncrement.html.
CMS
Wolfram Language. 1988. "PreIncrement." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PreIncrement.html.
APA
Wolfram Language. (1988). PreIncrement. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PreIncrement.html
BibTeX
@misc{reference.wolfram_2025_preincrement, author="Wolfram Research", title="{PreIncrement}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/PreIncrement.html}", note=[Accessed: 15-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_preincrement, organization={Wolfram Research}, title={PreIncrement}, year={1988}, url={https://reference.wolfram.com/language/ref/PreIncrement.html}, note=[Accessed: 15-August-2025]}