Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Retaining variable/function expressions from session to session

  • To: mathgroup at
  • Subject: [mg63431] Re: [mg63416] Retaining variable/function expressions from session to session
  • From: "David Park" <djmp at>
  • Date: Sat, 31 Dec 2005 06:40:28 -0500 (EST)
  • Sender: owner-wri-mathgroup at


I don't see why it is odd that Mathematica forgets assignments at the end of
a session. Otherwise, everytime you started Mathematica it would be filled
with all kinds of definitions you had no use for.

In any case, why not put an Initialization Section at the top of your
notebook and put all of these definitions there. Make them Initialization
cells and when you first save the notebook DON'T create an AutoSave Package.
Then, everytime you open the notebook and start to work in it, these
initialization definitions will automatically be evaluated. If some of them
are the result of long calculations you may want to do the calculation once
and copy the result to a new definition and put that in the Initialization

David Park
djmp at

From: Charles Ashley [mailto:cka2 at]
To: mathgroup at


Is it possible to have variables and functions retain their assigned
expressions from session to session?  I'm working on a problem that
consists of a dozen variables and it seems odd that Mathematica
"forgets" the expression that I've assigned to each variable when I
close out of a session.  To date my solution has just been to "remind"
Mathematica of the assigned expression by reevaluating it each time I
start a new session, but there must be a better way.


Charles Ashley

cka2 at

  • Prev by Date: is there a way to have the "Get" accept C formed %E numbers like Read does for Real?
  • Next by Date: Re: Question regarding procedures
  • Previous by thread: Re: Retaining variable/function expressions from session to session
  • Next by thread: How to show level of accuracy from original data FROM Re: Coefficients from Fit as a list?