Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > Tuning & Debugging > Symbol Handling >
Mathematica > Core Language > Package Development > Namespace Management > Symbol Handling >

OwnValues

OwnValues[x]
gives the rule corresponding to any ownvalue defined for the symbol x.
Set a value for x:
Display its ownvalues:
Set a value for x:
In[1]:=
Click for copyable input
Display its ownvalues:
In[2]:=
Click for copyable input
Out[2]=
OwnValues returns rules corresponding to definitions made for symbols:
OwnValues can be used to set values directly:
Values can be defined by immediate or delayed assignments:
HoldPattern is used to protect the rules from their own definitions:
OwnValues has attribute HoldAll to protect against its argument's values:
Definition and Information display ownvalues but do not return them as values:
OwnValues returns a value that can be used in a program:
Evaluation of a symbol is equivalent to applying the rules for its definition:
Copy a symbol's value to another symbol:
New in 2
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team