MathGroup Archive 2001

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

Search the Archive

Re: Clearing Subscripted Variables?

  • To: mathgroup at
  • Subject: [mg31439] Re: Clearing Subscripted Variables?
  • From: "Allan Hayes" <hay at>
  • Date: Mon, 5 Nov 2001 03:48:23 -0500 (EST)
  • References: <9s1usi$o4p$>
  • Sender: owner-wri-mathgroup at


Your definitions, below, are tagged by  Subscript, which has context
"Symbol`" not "Global`" so they are not cleared
by Clear["Global`*"].


It would be inadvisable to use  Clear["Symbol`*"]., but we can use




Alternatively we could alter the definition to tag the stored rule with f
(as UpValues of f}

    For[i = 0, i < 4, i++, f /: Subscript[f, i] = 0]

Then we can use


or the briefer


Allan Hayes
Mathematica Training and Consulting
Leicester UK
hay at
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"Randall Edick" <randydebbi1 at> wrote in message
news:9s1usi$o4p$1 at
> Math Group,
> I initialized a set of subscripted variables
> For[i=0,i<10,i++,Subscript[f,i]=0]
> Then, can't Clear or Unset the values.  Things such as Clear["Global`*"]
> don't work.  Why?
> I guess its being replaced by the value 0 before the Clear.  How can I
> that (I guess
> SetDelayed would have work better) but how can I lose this definition?
> --

  • Prev by Date: lists w/o double brackets
  • Next by Date: Re: Zero does not equal Zero
  • Previous by thread: Re: Clearing Subscripted Variables?
  • Next by thread: Re: Clearing Subscripted Variables?