Initialize

Initialize[sym]

initializes the symbol sym from persistent values on the default persistence path.

Initialize[sym,{loc1,}]

initializes the symbol sym from persistent values on the persistence path {loc1,}.

Initialize["patt"]

initializes all variables matching the string pattern "patt".

Details and Options

Examples

open allclose all

Basic Examples  (1)

Set an initialization value for a variable:

Initialize the variable from the persistent value:

Options  (1)

MergingFunction  (1)

Establish a default value and merging function for an initialization value:

Add an initialization value at the front end persistence location:

The resulting initialization value now uses the default merging function:

You can override the default merging function to use for an initialization:

Properties & Relations  (1)

Set an initialization value for a variable persisting for the current front end session:

Quit and restart the kernel:

Each newly started kernel will automatically invoke Initialize for all variables:

After quitting and restarting the front end, the initialization value is gone:

Introduced in 2017
 (11.2)