|
[Date Index]
[Thread Index]
[Author Index]
Re: Quit versus Clear["Global`*"]
- To: mathgroup at smc.vnet.net
- Subject: [mg121233] Re: Quit versus Clear["Global`*"]
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Mon, 5 Sep 2011 07:07:14 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
On 9/4/11 at 6:06 PM, tmatsoukas at me.com (Themis Matsoukas) wrote:
>So, if I use ClearAll["Global`*"] at the beginning of a notebook and
>execute all the cells, is it the same as running on a fresh kernel?
No. This will not reset the evaluation history. Nor will it
remove any packages you may have loaded That is:
In[1]:= x = 4
Out[1]= 4
In[2]:= y = x^2
Out[2]= 16
In[3]:= ClearAll["Global`*"]
In[4]:= %1 + %2
Out[4]= 20
The closest way I know of to reset things to the initial start
up condition is to put a directive to load the CleanSlate
package into init.m. Then after a series of evaluations you can do
CleanSlate[]
which resets things to the point where the CleanSlate package
was loaded.
The last three lines of my init.m are:
<<PacletManager`;
<<Utilities`CleanSlate`;
SetOptions[CleanSlate,Verbose->False];
I explicitly load the PacletManager since I found in earlier
versions of Mathematica, the PackletManager was loading after
everything in init.m executed. I have not tested ver 8 to see if
this is still true. Assuming it is still true, if the
PackletManager is not loaded explicitly in this manner it will
be removed when CleanSlate[] is executed.
Prev by Date:
Re: Addon packet errors
Next by Date:
Re: Quit versus Clear["Global`*"]
Previous by thread:
Re: Quit versus Clear["Global`*"]
Next by thread:
Re: Quit versus Clear["Global`*"]
|