This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Built-in Functions / Programming / Attributes  /
ClearAttributes

  • ClearAttributes[ s , attr ] removes attr from the list of attributes of the symbol s.
  • ClearAttributes modifies Attributes[ s ].
  • ClearAttributes[ s , , , ... ] removes several attributes at a time.
  • ClearAttributes[ , , ... , attrs ] removes attributes from several symbols at a time.
  • ClearAttributes is HoldFirst.
  • ClearAttributes does not affect symbols with the attribute Locked.
  • See the Mathematica book: Section 2.3.7Section 2.5.3.
  • See also: SetAttributes, Unprotect.

    Further Examples

    This defines a function for integer arguments.

    In[1]:=

    It doesn't do anything on lists.

    In[2]:=

    Out[2]=

    This makes it listable.

    In[3]:=

    Now it works on lists.

    In[4]:=

    Out[4]=

    This makes fun1 no longer listable; the definition still works.

    In[5]:=

    In[6]:=

    Out[6]=

    In[7]:=