Question: How to unassign some variables ?

Hi everyone

I would like to unassign all  'user' variables but some of them.
More precisely, if 

  • MyVars := anames('user')
  • and KeepThese := {...} is some subset (manually constructed) of MyVars

I was thinking to something like
for k in MyVars minus KeepThese  do
   k := 'k'   # or k := unassign('k')
end do;

... which (obviously) does not work as desired because 'k' refers to the variable of name k and not to the variable k represents.

How is it possible to fix this ?

Great thanks in advance

Please Wait...