Re: Clearing the definitions saved by using the "Save" command

*To*: mathgroup at smc.vnet.net*Subject*: [mg56574] Re: Clearing the definitions saved by using the "Save" command*From*: Peter Pein <petsie at arcor.de>*Date*: Fri, 29 Apr 2005 03:20:46 -0400 (EDT)*References*: <d4q2a9$olp$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

TingYF at gmail.com wrote: > Hello All, > > This is got to be a silly question but I just can't think of the right > key words that can help me find a solution on this list. I was trying > to save the definitions and contents of variables by using the Save > command, and I cannot find a way to clear what I have saved. > > So now when I type > > !!test > > Mathematica gives the list of variables and definitions that I no > longer need. I tried ClearAll, quitting kernel, closing Mathematica and > reopening it but none worked. > > Thanks a lot! > > Carol > Hi Carol, !!test shows the contents of the file where you saved your definitions. To get rid of it either delete it by mean of your OS or enter DeleteFile[Directory[]<>"\\test"] in your Mathematica session. To delete the definition assigned to a symbol either use Clear[symbolname] or Remove[symbolname] example: In[1]:= f[x_] := Sin[Pi*x]; In[2]:= ??f Global`f f[x_]:=Sin[\[Pi] x] In[3]:= Save["test", f]; Remove[f]; In[5]:= ??f Information::notfound: Symbol f not found. More... In[6]:= !!test From In[6]:= f[x_] := Sin[Pi*x] In[7]:= DeleteFile["test"] In[8]:= !!test From In[8]:= General::noopen: Cannot open test. More... -- Peter Pein Berlin