Hold

Hold[expr]

maintains expr in an unevaluated form.

Details

  • Hold has attribute HoldAll and performs no operation on its arguments.
  • Hold is removed by ReleaseHold. »
  • Hold[e1,e2,] maintains a sequence of unevaluated expressions to which a function can be applied using Apply.
  • Even though expr itself is not evaluated, Hold[expr] may still evaluate if expr is of the form f[args], and upvalues for f have been defined. »

Examples

open allclose all

Basic Examples  (1)

Hold an expression to prevent evaluation:

In[1]:=
Click for copyable input
Out[1]=

Release the hold:

In[2]:=
Click for copyable input
Out[2]=

Applications  (2)

Properties & Relations  (9)

See Also

HoldPattern  HoldForm  HoldComplete  Unevaluated  HoldAll  HoldAllComplete  HoldFirst  HoldRest  Inactivate  Symbol  Defer

Tutorials

Introduced in 1988
(1.0)