ValuePreprocessingFunction

ValuePreprocessingFunction

is an option for functions such as PersistentSymbol and InitializationValue that specifies a function to apply to a new value that is being assigned.

Details

Examples

Basic Examples  (1)

Define a value preprocessing function that accepts only integers:

Set up a default value and the value preprocessing function for a persistent value named "int":

Assign an integer at any persistence location:

Assigning anything else generates an error, and the assignment is not performed:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_valuepreprocessingfunction, organization={Wolfram Research}, title={ValuePreprocessingFunction}, year={2017}, url={https://reference.wolfram.com/language/ref/ValuePreprocessingFunction.html}, note=[Accessed: 22-December-2024 ]}