Mathematica 9 is now available
 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]:=



    Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
    THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
    SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.