Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > Package Development >

UpSet (^=)

lhs^=rhs
assigns rhs to be the value of lhs, and associates the assignment with symbols that occur at level one in lhs.
  • f[g[x]]=value makes an assignment associated with f. f[g[x]]^=value makes an assignment associated instead with g.
  • UpSet associates an assignment with all the distinct symbols that occur either directly as arguments of lhs, or as the heads of arguments of lhs.
Define a symbolic property of a symbol:
Define a symbolic property of a symbol:
In[1]:=
Click for copyable input
Out[1]=
^= defines upvalues:
If several symbols appear in the left-hand side, upvalues for all of them are defined:
Build a database of exchange rates:
^= defines upvalues in the same way as using a tag does:
^= defines upvalues, = defines downvalues:
New in 1
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team