adds attr to the list of attributes of the symbol symbol.


adds attr to the attributes of the symbol named "symbol" if it exists.


sets several attributes at a time.


sets attributes of several symbols at a time.



open allclose all

Basic Examples  (2)

Scope  (3)

Add an attribute to the list of attributes of a symbol:

Add more attributes; the previous ones are retained:

Add several attributes:

Add the same attributes to several symbols:

Properties & Relations  (6)

Set a single attribute for the symbols f and g:

SetAttributes adds to the already existing attributes; Attributes[g]={..} resets the list:

SetAttributes is equivalent to this assignment to the attributes:

Use ClearAttributes to clear a particular attribute:

Protecting a symbol is equivalent to setting the Protected attribute:

You can still change the attributes of a protected symbol:

After setting the attribute Locked, no more changes to the attributes can be made:

A locked symbol can no longer be unprotected, as the Protected attribute cannot be cleared:

SetAttributes has the attribute HoldFirst:

This sets attributes of the symbol syms itself:

This sets the attributes of all symbols in the list syms:

Neat Examples  (1)

The 10 system symbols with the most attributes:

Wolfram Research (1988), SetAttributes, Wolfram Language function,


Wolfram Research (1988), SetAttributes, Wolfram Language function,


@misc{reference.wolfram_2021_setattributes, author="Wolfram Research", title="{SetAttributes}", year="1988", howpublished="\url{}", note=[Accessed: 17-June-2021 ]}


@online{reference.wolfram_2021_setattributes, organization={Wolfram Research}, title={SetAttributes}, year={1988}, url={}, note=[Accessed: 17-June-2021 ]}


Wolfram Language. 1988. "SetAttributes." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (1988). SetAttributes. Wolfram Language & System Documentation Center. Retrieved from