I have a bunch of symbols which are collected as a list inside a variable within a bit of code e.g.
a=1;b=2;
par={a,b};
I want to clear the values of both a and b using only a reference to par. Here is my attempt and the error produced:
Clear[Sequence@@par]
... Clear::ssym: Sequence@@par is not a symbol or a string.
I can understand why this gives an error but can't figure out a way out of it.
Thanks for your help
paris simply{1, 2}here, how would it know about the symbolsaandb? – Marius Ladegård Meyer Mar 31 '17 at 09:47??par. – J. M.'s missing motivation Mar 31 '17 at 09:48par = Hold[a, b];and much later,Scan[Clear, par]orClear @@ par. – J. M.'s missing motivation Mar 31 '17 at 10:00