I have multiple notebooks open, with similar variable declaration (am studying test cases), and I want all notebooks to be independent of each other, and also forget it's own evaluation after finishing. I have added
ClearAll["Global*"]
at the top of the notebook. Also done: Default Kernel
as Local
. Plus assigned Notebook's Default Context
as Unique to this Notebook
But it still retains values.
I just tried adding Quit
at the end of the notebook, but each time I Evaluate Notebook again (after it has done Quit
once), my program crashes. I put Quit
at the beginning of the notebook and did Evaluate Notebook
but it compiled the first cell with Quit
and then it stops there.
I am out of ideas, any suggestions?
I need this to be default - never having dependence of notebooks on each other and never remember values after ending one evaluation... I want it automated (right now, I have to do Evaluation > Quit Kernel after each evaluation...
Global`
context, soClearAll["Global
*"]` is doing nothing. TryClearAll[StringJoin[Context[], "*"]]
instead. $\endgroup$ClearAll:: Context[]<>* is not a symbol or a string.
" withClearAll[StringJoin[Context[], "*"]]
but I tried withClearAll[Evaluate[Context[] <> "*"]]
and it works perfectly; thank you very much! $\endgroup$