Mathematica 9 is now available
 Documentation / Mathematica / Built-in Functions / Programming / Attributes  /
Attributes

  • Attributes[ symbol ] gives the list of attributes for a symbol.
  • The attributes of a symbol can be set by assigning a value to Attributes[ s ]. If a single attribute is assigned, it need not be in a list.
  • Attributes[ s ] = clears all attributes of a symbol.
  • Attributes[ , , ... ] gives a list of the attributes for each of the .
  • Attributes[" str "] gives a list of the attributes for all symbols which match the string pattern str.
  • Attributes[HoldPattern[ s ]] is treated as equivalent to Attributes[ s ].
  • Attributes for functions must be set before any definitions that involve the functions are given.
  • The complete list of possible attributes for a symbol f is:
  • See the Mathematica book: Section 2.3.7Section 2.5.3.
  • See also: SetAttributes, ClearAttributes.

    Further Examples

    This gives the attributes of the Plus function.

    In[1]:=

    Out[1]=

    Here are the attributes of Log and of Integrate.

    In[2]:=

    Out[2]=



    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.