PreDecrement
✖
PreDecrement
decreases the value of x by 1, returning the new value of x.
Details

- --x is equivalent to x=x-1.
- PreDecrement has attribute HoldFirst.
- In PreDecrement[x], x can be a symbol or other expression with an existing value. »
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Scope (4)Survey of the scope of standard use cases

https://wolfram.com/xid/0b8c4ln0q6-3mn70w


https://wolfram.com/xid/0b8c4ln0q6-2dqqdg

Decrement all values in a list:

https://wolfram.com/xid/0b8c4ln0q6-boaay


https://wolfram.com/xid/0b8c4ln0q6-2v76mu

The argument to PreDecrement need not be a symbol:

https://wolfram.com/xid/0b8c4ln0q6-5axyxt


https://wolfram.com/xid/0b8c4ln0q6-s6reew


https://wolfram.com/xid/0b8c4ln0q6-tck70d

Applications (1)Sample problems that can be solved with this function
Properties & Relations (4)Properties of the function, and connections to other functions
Decrement and PreDecrement differ in the return value of the operation:

https://wolfram.com/xid/0b8c4ln0q6-jd4rit

https://wolfram.com/xid/0b8c4ln0q6-i3im0b


https://wolfram.com/xid/0b8c4ln0q6-dikf4d

PreDecrement is a short form of this assignment:

https://wolfram.com/xid/0b8c4ln0q6-5h1xz5

PreDecrement is a special case of SubtractFrom:

https://wolfram.com/xid/0b8c4ln0q6-lk1x9y

Increment and PreIncrement are closely related operations:

https://wolfram.com/xid/0b8c4ln0q6-krw5xl

https://wolfram.com/xid/0b8c4ln0q6-hx12qy


https://wolfram.com/xid/0b8c4ln0q6-bvd0m5

Wolfram Research (1988), PreDecrement, Wolfram Language function, https://reference.wolfram.com/language/ref/PreDecrement.html.
Text
Wolfram Research (1988), PreDecrement, Wolfram Language function, https://reference.wolfram.com/language/ref/PreDecrement.html.
Wolfram Research (1988), PreDecrement, Wolfram Language function, https://reference.wolfram.com/language/ref/PreDecrement.html.
CMS
Wolfram Language. 1988. "PreDecrement." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PreDecrement.html.
Wolfram Language. 1988. "PreDecrement." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PreDecrement.html.
APA
Wolfram Language. (1988). PreDecrement. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PreDecrement.html
Wolfram Language. (1988). PreDecrement. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PreDecrement.html
BibTeX
@misc{reference.wolfram_2025_predecrement, author="Wolfram Research", title="{PreDecrement}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/PreDecrement.html}", note=[Accessed: 26-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_predecrement, organization={Wolfram Research}, title={PreDecrement}, year={1988}, url={https://reference.wolfram.com/language/ref/PreDecrement.html}, note=[Accessed: 26-March-2025
]}