MathGroup Archive 2000

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

Search the Archive

Re: Re[2]: Q: Clear

  • To: mathgroup at smc.vnet.net
  • Subject: [mg21584] Re: Re[2]: [mg21533] Q: Clear
  • From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
  • Date: Sat, 15 Jan 2000 02:04:27 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

I can think of only one other approach that, I think,  will do what you
want. Use the Notation package.

In[1]:=
Needs["Utilities`Notation`"]

In[2]:=
Symbolize[NotationBoxTag[SubscriptBox[k, t_]]]

In[3]:=
k\[UnderBracket]Subscript\[UnderBracket]3 = 3

Out[3]=
3

In[4]:=
k\[UnderBracket]Subscript\[UnderBracket]5 = 7

Out[4]=
7

In[5]:=
Clear["k\[UnderBracket]Subscript\[UnderBracket]*"]

In[6]:=
k\[UnderBracket]Subscript\[UnderBracket]3

Out[6]=
k\[UnderBracket]Subscript\[UnderBracket]3

In[7]:=
k\[UnderBracket]Subscript\[UnderBracket]5

Out[7]=
k\[UnderBracket]Subscript\[UnderBracket]5

(I converted all the cells to Input or Output forms for greater legibility).
You can now use wile card * in Clear, provided you use the symbol name (a
String) as in In[5] above. Does this do what you wanted?


Andrzej Kozlowski
Toyama International University
Toyama, Japan
http://sigma.tuins.ac.jp/


> From: Christoph <handel at mechanik.tu-darmstadt.de>
To: mathgroup at smc.vnet.net
> Reply-To: Christoph <handel at mechanik.tu-darmstadt.de>
> Date: Fri, 14 Jan 2000 13:19:15 +0100
> To: Andrzej Kozlowski <andrzej at tuins.ac.jp>
> Subject: [mg21584] Re[2]: [mg21533] Q: Clear
> 
>>> if I define
>>> 
>>> Subscript[k, t]=42
>>> 
>>> how can I clear it?
>>> 
>>> Clear[k] -> Error
>>> Clear[Subscript[k, t]] -> Error
> 
> Unset[...]
> 
> Is there a way to Clear with a pattern?
> Unset[Subscript[k,*]] won't work and another problem is, that i will
> get errors (bad for coding blocks) when I try to unset something which
> wasn't set.
> 
> 
> Gruss
> Christoph
> 
> -- 
> Norton Signature Protection - Just copy to protect against Singature99 and
> other viruses
> 
> 



  • Prev by Date: Re: Problem with Display and ImageSize
  • Next by Date: Re: ReadList of Complex Numbers
  • Previous by thread: Re: Q: Clear
  • Next by thread: Q: NDSolve