appends definitions associated with the specified symbol to a file.
appends definitions associated with all symbols whose names match the string pattern "patt".
appends definitions associated with all symbols in the specified context.
appends definitions associated with several objects.
- Save uses FullDefinition to include subsidiary definitions.
- Save writes out definitions in InputForm.
- Save uses Names to find symbols whose names match a given string pattern.
- You can use Save["filename","s"] to write out the definition for the value of a symbol s itself.
- Save works with local and cloud objects.
- Save[File["filename"],…] is also supported.
Examplesopen allclose all
Basic Examples (2)
Create a temporary file:
Store a value in a variable:
Save the value of the variable in a file:
Loading the file restores the value of a:
Create multiple definitions to save:
Save the definitions to standard out to see how they would be written to a file:
Save a definition into a file specified by the File object:
Generalizations & Extensions (2)
Local objects can be used with Save to save definitions persistently:
Cloud objects can be used with Save to save definitions in the cloud:
Save all definitions in the default context:
Properties & Relations (2)
Save writes the output of FullDefinition to a file:
Saved definitions can be read into the Wolfram Language using Get:
Print the contents of the saved file:
Clear definitions in the current session:
Get the definitions into the current session:
Introduced in 1988
Updated in 1996