[Date Index] [Thread Index] [Author Index]
Re: ClearAll ?? or what
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.