Re: Subscript[x,1] value do not get cleared using Clear["Global`*"] but get removed using Remove["Global`*]
- To: mathgroup at smc.vnet.net
- Subject: [mg104059] Re: Subscript[x,1] value do not get cleared using Clear["Global`*"] but get removed using Remove["Global`*]
- From: Colin Rose <colin at tri.org.au>
- Date: Sat, 17 Oct 2009 07:03:42 -0400 (EDT)
- References: <hb9jt6$ke$1@smc.vnet.net>
"Nasser M. Abbasi" <nma at 12000.org> wrote: > Before, I used to use Clear["Global`*] to clear all variable, until I just > found subscripted variable do not get cleared > > In[31]:= Remove["Global`*"] > > In[33]:= Subscript[a, 1] = 5 > > In[34]:= Subscript[a, 1] > Out[34]= 5 > > In[35]:= Clear["Global`*"] --> now clear it > > In[36]:= Subscript[a, 1] > Out[36]= 5 ----> did not clear In related vein, I find the following long-standing behaviour to be irksome and illogical: In[1]:= Subscript[x, 1] = 3 In[2]:= Clear[Subscript[x, 1]] Clear::ssym: Subscript[x, 1] is not a symbol or a string. >> To clear the subscript, you have to use Unset, which produces beeps if the Subscript[x,1] has not been assigned a value. All so messy. Why not just make Clear do what it is meant to do, or at least, make it do what people reasonably expect it will do? Cheers Colin
- Follow-Ups:
- Re: Subscript[x,
- From: danl@wolfram.com
- Re: Subscript[x,
- From: danl@wolfram.com
- Re: Subscript[x,