How to kill the content of a list instead of the list itself?



Thanks for you reply, but that command doesn't work. Actually, apply or even
a do loop on a list have no effect.

For example:

for i in mylist do kill(i);

doesn't kill anything... why?





2010/12/29 Stavros Macrakis <macrakis at alum.mit.edu>

> apply ( 'kill, mylist )
>
>
> On 2010-12-29, Stefano Ferri <ferriste at gmail.com> wrote:
> > I have a list containing some variables, for example:
> >
> > mylist : [a,b,c,d]
> >
> > a, b, c, d may have or not assigned values. That list can have much more
> > elements than the four in the example.
> > I would like to kill a, b, c, d by giving kill mylist as argument. But
> >
> > kill(mylist)
> >
> > only kills the variable mylist and leaves unchanged a, b, c, d. Actually,
> > kill can kill list content without killing the list itself, like:
> >
> > kill(labels)
> >
> > where labels, arrays, functions are special list variables, and they are
> not
> > deleted. So I'm guessing I should give mylist some special properties,
> maybe
> > using declare or something similar...
> >
> > Any suggestion?
> >
> > Thanks
> > Stefano
> >
>
> --
> Sent from my mobile device
>