SaveDefinitions
is an option to Manipulate and related functions that specifies whether current definitions relevant for the evaluation of the expression being manipulated should automatically be saved.
Details
- With SaveDefinitions->True, Manipulate saves the current assignments for every symbol in the Manipulate, and also saves subsidiary definitions using the same mechanism as Save.
- SaveDefinitions->True will not save definitions for symbols with the attribute Protected or ReadProtected.
- SaveDefinitions->True prepends any definitions it finds to the Initialization option setting.
Examples
open allclose allBasic Examples (3)
By default, definitions are not saved:
Force definitions to be saved with the output:
The saved Manipulate can be copied and directly run in a new notebook:
Scope (1)
All definitions are saved, including OwnValues:
Properties & Relations (3)
Definitions are transformed to a literal Initialization setting during typesetting:
SaveDefinitions->True relies on FullDefinition to extract definitions:
Symbols that are Protected or ReadProtected will not be saved:
Possible Issues (3)
Definitions for any unprotected symbol in the Manipulate body will be saved:
Saved variable definitions are effectively treated as global:
This can have an impact on future kernel sessions:
Multiple Manipulate outputs defining the same global variable may conflict:
Text
Wolfram Research (2007), SaveDefinitions, Wolfram Language function, https://reference.wolfram.com/language/ref/SaveDefinitions.html.
CMS
Wolfram Language. 2007. "SaveDefinitions." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SaveDefinitions.html.
APA
Wolfram Language. (2007). SaveDefinitions. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SaveDefinitions.html