MathGroup Archive 1995

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

Search the Archive

Re: Q>How to clear all variables

  • To: mathgroup at christensen.cybernetics.net
  • Subject: [mg1761] Re: Q>How to clear all variables
  • From: larso171 at maroon.tc.umn.edu (James Albert Larson)
  • Date: Wed, 26 Jul 1995 00:50:42 -0400
  • Organization: University of Minnesota, Twin Cities

>But if you have been working for 1 hours and you want to clear all
>the variables you have assigned is there a way much simplier than:
>- digit: Clear(x1,x2,x3,.......,x10000)
>- save the notebooks, quit mathematica, restart mathematica, open the noteb.
>

Oh probably there is an easier way to clear all x# variables.  
Clear[Names["x*"]] or something.  But you probably often have the situation 
where you have a lot of variables with a variety of names.  It drove me 
nuts too.  I finally got CleanSlate.m from Mathsource (available also 
from Wolfram forum on Compuserve).  I was afraid that it would take a 
rocket scientist to learn it, but finally got desperate enough to try it.  
It has a lot of capabilities for clearing only certain contexts, all 
contexts but something etc. etc.  But I only use a simple subset of it:  
ClearInOut[] clears the In and Out (thus saving memory).  And CleanSlate[] 
-- clears out everything, leaving you in the same state as you would be 
just starting a fresh Mathematica session (well not quite, but that's a 
long story.  But it does the job I need done 99.9% of the time).

I like it so much that I made reading in this package part of my init.m 
file, so that it is automatically present in my MMA session.

Jim Larson


  • Prev by Date: Bugs with transcendental functions?
  • Next by Date: On::none: Message SeriesData::csa not found.
  • Previous by thread: Bugs with transcendental functions?
  • Next by thread: On::none: Message SeriesData::csa not found.