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


Groups > comp.soft-sys.math.mathematica > #4300 > unrolled thread

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

Started byThemis Matsoukas <tmatsoukas@me.com>
First post2011-08-11 09:11 +0000
Last post2011-08-12 09:14 +0000
Articles 3 — 3 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  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

#4300 — How does Clear["Global`*"] work?

FromThemis Matsoukas <tmatsoukas@me.com>
Date2011-08-11 09:11 +0000
SubjectHow does Clear["Global`*"] work?
Message-ID<j206b9$71e$1@smc.vnet.net>
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

[toc] | [next] | [standalone]


#4330

FromDavid Bailey <dave@removedbailey.co.uk>
Date2011-08-11 11:56 +0000
Message-ID<j20g2a$8uo$1@smc.vnet.net>
In reply to#4300
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

[toc] | [prev] | [next] | [standalone]


#4353 — Re: work?

FromMurray Eisenberg <murray@math.umass.edu>
Date2011-08-12 09:14 +0000
SubjectRe: work?
Message-ID<j22qte$gtt$1@smc.vnet.net>
In reply to#4300
I'm not seeing any such error message in 8.0.1.

On 8/11/11 7:55 AM, David Bailey wrote:
> 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
>

-- 
Murray Eisenberg                     murray@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web