$PreInitialization

$PreInitialization

is a symbol whose value, if any, is evaluated with ReleaseHold[$PreInitialization] before any other initializations in a Wolfram Language session.

Details

  • Persistent values of $PreInitialization are typically set with InitializationValue[$PreInitialization]=Hold[expr].
  • Values defined in different persistence locations on $PersistencePath are joined with Flatten.
  • Since $PreInitialization is used early in the startup of a Wolfram Language session, not all capabilities will already be initialized. For example, remote access such as of the cloud from the desktop will not yet be available.

Examples

open allclose all

Basic Examples  (1)

Set a value to be evaluated early every time the kernel starts:

View the current initialization value:

Properties & Relations  (2)

Initialization values are stored in persistent objects:

List the existing initialization values for $PreInitialization in all editable persistence locations:

Remove them:

Possible Issues  (1)

Create an initialization value for $PreInitialization in a nondefault location:

Remove by default removes only the value in the location given by $PersistenceBase:

Remove all values that might exist anywhere in all editable locations given by $PersistencePath:

The default value is still present:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_$preinitialization, organization={Wolfram Research}, title={$PreInitialization}, year={2017}, url={https://reference.wolfram.com/language/ref/$PreInitialization.html}, note=[Accessed: 21-December-2024 ]}