ValuePreprocessingFunction

ValuePreprocessingFunction

is an option for functions such as PersistentValue 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:

Introduced in 2017
 (11.2)