MathGroup Archive 2009

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

Search the Archive

Re: ClearAll ?? or what

  • To: mathgroup at smc.vnet.net
  • Subject: [mg102800] Re: ClearAll ?? or what
  • From: pfalloon <pfalloon at gmail.com>
  • Date: Thu, 27 Aug 2009 06:37:12 -0400 (EDT)
  • References: <h7371j$b28$1@smc.vnet.net>

On Aug 26, 9:41 pm, "noslowski" <noslow... at comcast.net> wrote:
> Is there a command that will remove all variables, custom functions,
> equations and so on?  
> I have tried every one that I can find including ClearAll [ " Global ' * "
> ], and so on.
>
> When I bring up the text book that I writing, I always end up with problems
> because I forgot to clear something out.  My book is interactive.   It would
> be nice to have a command that would clear everything out when I bring up my
> book each time.  There use to be a command in Fortran that did this, but I
> cannot find one in Mathematica.  
>
> I do have Dynamic Evaluation tuned off.
>
> Prof. Jake

ClearAll should do the trick. In the code fragment above you used the
' character where it should be `, i.e.

ClearAll["Global`*"]

Maybe this is why it's not working?

Alternatively, if you have loaded packages there will be other
contexts defined -- maybe these are the problem? In that case you
could add the appropriate contexts to ClearAll (though you may need to
Unprotect first).

Incidentally, you may want to use Remove instead of Clear or ClearAll
-- this is particularly important if your problem involves name
clashes (i.e. "shadowing") between symbols from different contexts.

Hope this helps!

Cheers,
Peter.


  • Prev by Date: Re: ClearAll ?? or what
  • Next by Date: interpolating function as initial condition
  • Previous by thread: Re: ClearAll ?? or what
  • Next by thread: Re: ClearAll ?? or what