MATHGROUP MESSAGE Re: Comprehensive Clear ?
- To: mathgroup at smc.vnet.net
- Subject: [mg43238] MATHGROUP MESSAGE Re: Comprehensive Clear ?
- From: "Christos Argyropoulos M.D." <argchris at otenet.gr>
- Date: Wed, 20 Aug 2003 22:26:23 -0400 (EDT)
- References: <bht380$n0s$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi, Try the following : Clear[Evaluate[ToString[$Context]<>"*"]] Example In[1]:= f[x_]:=Sin[x] f[2.] Clear[Evaluate[ToString[$Context]<>"*"]] f[2] Out[2]= 0.909297 Out[4]= f[2] Definition of f, is cleared; this will clear all symbols from the current context (the one you are working). Mathematica provides the syntax Clear["context`*"] to clear all symbols in a particular context. Christos Argyropoulos ----- Original Message ----- From: <tasande at mit.edu> To: mathgroup at smc.vnet.net Subject: [mg43238] Comprehensive Clear ? > MathGroup: > > Is there a command similar to Clear, or ClearAll, that will "Clear" all > variables without having to explicitly list them? I may have "forgotten" > variables on the loose, whose names I have forgotten and whose orginal input > cells I may have erased. I wish to be circumspect, and comprehensively > clear the past history of a notebook. > > Sincerely, > > Theodore Sande > MIT Department of Physics > tasande at mit.edu ? > >