OwnValues

OwnValues[x]

gives the rule corresponding to any ownvalue defined for the symbol x.

Examples

open allclose all

Basic Examples  (1)

Set a value for x:

Display its ownvalues:

Scope  (2)

OwnValues returns rules corresponding to definitions made for symbols:

OwnValues can be used to set values directly:

Properties & Relations  (5)

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:

Neat Examples  (1)

Copy a symbol's value to another symbol:

Introduced in 1991
 (2.0)