SubtractFrom

x-=dx

subtracts dx from x and returns the new value of x.

Details

Examples

open allclose all

Basic Examples  (1)

Scope  (4)

Subtract from a numerical value:

Subtract from a symbolic value:

Subtract from all values in a list:

The first argument to SubtractFrom need not be a symbol:

Applications  (1)

Find the last prime below one million:

Properties & Relations  (3)

SubtractFrom is a short form of this assignment:

PreDecrement is a special case of SubtractFrom:

AddTo is closely related:

Possible Issues  (1)

A variable to be decremented must have an initial value:

Wolfram Research (1988), SubtractFrom, Wolfram Language function, https://reference.wolfram.com/language/ref/SubtractFrom.html.

Text

Wolfram Research (1988), SubtractFrom, Wolfram Language function, https://reference.wolfram.com/language/ref/SubtractFrom.html.

CMS

Wolfram Language. 1988. "SubtractFrom." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SubtractFrom.html.

APA

Wolfram Language. (1988). SubtractFrom. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SubtractFrom.html

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_subtractfrom, organization={Wolfram Research}, title={SubtractFrom}, year={1988}, url={https://reference.wolfram.com/language/ref/SubtractFrom.html}, note=[Accessed: 24-December-2024 ]}