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

  • UpValues[ f ] gives a list of transformation rules corresponding to all upvalues defined for the symbol f.
  • You can specify the upvalues for f by making an assignment of the form UpValues[ f ] = list.
  • The list returned by UpValues has elements of the form HoldPattern[ lhs ] :> rhs.
  • See the Mathematica book: Section 2.4.13.
  • See also: Set, DownValues, HoldAllComplete.

    Further Examples

    This defines two upvalues for unitsquare and checks what they are.

    In[1]:=

    Out[1]=

    In[2]:=

    Out[2]=

    In[3]:=

    Out[3]=



    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.