Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4330

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

From David Bailey <dave@removedbailey.co.uk>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: How does Clear["Global`*"] work?
Date 2011-08-11 11:56 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j20g2a$8uo$1@smc.vnet.net> (permalink)
References <j206b9$71e$1@smc.vnet.net>

Show all headers | View raw


On 11/08/2011 10:11, Themis Matsoukas wrote:
> According to http://reference.wolfram.com/mathematica/howto/ClearMyDefinitions.html, 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
http://www.dbaileyconsultancy.co.uk

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How does Clear["Global`*"] work? Themis Matsoukas <tmatsoukas@me.com> - 2011-08-11 09:11 +0000
  Re: How does Clear["Global`*"] work? David Bailey <dave@removedbailey.co.uk> - 2011-08-11 11:56 +0000
  Re: work? Murray Eisenberg <murray@math.umass.edu> - 2011-08-12 09:14 +0000

csiph-web