MathGroup Archive 2011

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

Search the Archive

Re: How does Clear["Global`*"] work?

  • To: mathgroup at
  • Subject: [mg120822] Re: How does Clear["Global`*"] work?
  • From: David Bailey <dave at>
  • Date: Thu, 11 Aug 2011 07:55:33 -0400 (EDT)
  • Delivered-to:
  • References: <j206b9$71e$>

On 11/08/2011 10:11, Themis Matsoukas wrote:
> According to, Clear["Global`*"] clears all the definitions made during the current Mathematica session. However,
> a = 1;
> Clear["Global`*"]
> a
> 1
> How is Clear["Global`*"] supposed to work?
> Thanks

This looks to me like a bug introduced at 8.0. The command Clear["Global`*"]
seems to work at 7.0, but at 8.0 it generates an error message:

Clear::wrsym: Symbol TimeStamp is Protected. >>

This seems to be because at 8.0, Wolfram have accidentally introduced a 
protected symbol into the Global` context:

In[9]:= Context[TimeStamp]

Out[9]= "Global`"

In[10]:= Attributes[TimeStamp]

Out[10]= {Protected}

Presumably this aborts the Clear command part way through (though of 
course many commands don't give up if they hit an error).

David Bailey

  • Follow-Ups:
    • Re: work?
      • From: Murray Eisenberg <>
  • Prev by Date: Re: ListDensityPlot and Legend
  • Next by Date: Re: Just another Mathematica "Gotcha"
  • Previous by thread: Re: How does Clear["Global`*"] work?
  • Next by thread: Re: work?