PreDecrement

--x

decreases the value of x by 1, returning the new value of x.

Details

Examples

open allclose all

Basic Examples  (1)

Decrement the value by one and return the new value:

Scope  (4)

Decrement a numerical value:

Decrement a symbolic value:

Decrement all values in a list:

The argument to PreDecrement need not be a symbol:

Applications  (1)

Find the first integer below one million with a certain property:

Properties & Relations  (4)

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:

Possible Issues  (1)

A variable to be decremented must have an initial value:

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.

CMS

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

BibTeX

@misc{reference.wolfram_2023_predecrement, author="Wolfram Research", title="{PreDecrement}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/PreDecrement.html}", note=[Accessed: 19-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_predecrement, organization={Wolfram Research}, title={PreDecrement}, year={1988}, url={https://reference.wolfram.com/language/ref/PreDecrement.html}, note=[Accessed: 19-March-2024 ]}