Re: ClearAll error message
- To: mathgroup at smc.vnet.net
- Subject: [mg92356] Re: ClearAll error message
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Mon, 29 Sep 2008 07:05:38 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <gbnpep$pr3$1@smc.vnet.net>
carlos at colorado.edu wrote:
> Just out of curiosity. The following ClearAll works as expected.
>
> name=Symbol["A"]; ClearAll[name];
>
> But this elicits an error message:
>
> ClearAll[Symbol["A"]];
>
> Why? A non-standard argument evaluation?
*snip*
Correct: ClearAll does not evaluate its argument(s) (attribute *HoldAll*).
In[1]:= ClearAll[Symbol["A"]]
During evaluation of In[1]:= ClearAll::ssym: Symbol[A] is not
a symbol or a string.
In[2]:= Attributes[ClearAll]
Out[2]= {HoldAll, Protected}
In[3]:= ?HoldAll
HoldAll is an attribute which specifies that all arguments to
a function are to be maintained in an unevaluated form.
Regards,
-- Jean-Marc