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 2004

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

Search the Archive

Re: Remove["Global`"] ??

  • To: mathgroup at
  • Subject: [mg48004] Re: Remove["Global`"] ??
  • From: Bill Rowe <readnewsciv at>
  • Date: Wed, 5 May 2004 08:11:09 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

On 5/4/04 at 1:08 AM, siegman at (AES/newspost) wrote:

>In article <c72eaf$pj$1 at>,
>Bill Rowe <readnewsciv at> wrote:

>>I am guessing you are trying to remove all symbols from the
>>Global` context. If so, should have typed Remove["Global`*"]
>>instead of what you did type.

>I'm in the habit of putting  Remove["Global`*"]  as the first
>expression in the first evaluatable cell of my notebooks, so that
>reevaluations of the entire notebook produce a (more or less) clean

>In earlier versions of Matheamtica, this did not produce an error. 
>In later versions it produces an error on the first evaluation of a
>freshly opened notebook.  The workaround is to use  x;
>Remove["Global`*"] instead.

I can understand the desire to start with a more or less clean slate. In fact, there is a package available on the Wolfram web site called CleanSlate that I use to do just this. I have this package loaded at the start of every Mathematica session using init.m.

It has an advantage over Remove["Global`*"] in that it restores the session to the state it was when the package was loaded. This allows me to set global variables I commonly use in init.m and not have them removed when I restore things to my standard startup condition.
To reply via email subtract one hundred and four

  • Prev by Date: Re: Derivative of Sum
  • Next by Date: Re: Re: bug in IntegerPart ?
  • Previous by thread: Re: Remove["Global`"] ??
  • Next by thread: RE: on ColorFunction and combined images?