This is documentation for Mathematica 7, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Defer

Defer[expr]
yields an object that displays as the unevaluated form of expr, but which is evaluated if it is explicitly given as Mathematica input.
  • Defer[expr] returns an object which remains unchanged until it is explicitly supplied as Mathematica input, and evaluated using Shift+Enter, Evaluate in Place, etc.
  • Defer gives an object whose evaluation is merely deferred until it is explicitly given as Mathematica input; HoldForm gives an object that is never evaluated.
  • If an object contains several levels of nested Defer constructs, one level is removed each time the object is evaluated as Mathematica input.
By default, arguments are evaluated:
Use Defer to display an unevaluated form:
Copy the previous output and evaluate:
Use Defer to create cells with unevaluated contents:
By default, arguments are evaluated:
In[1]:=
Click for copyable input
Out[1]=
Use Defer to display an unevaluated form:
In[2]:=
Click for copyable input
Out[2]=
Copy the previous output and evaluate:
In[3]:=
Click for copyable input
Out[3]=
 
Use Defer to create cells with unevaluated contents:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
In[4]:=
Click for copyable input
In[5]:=
Click for copyable input
In[6]:=
Click for copyable input
Use HoldForm to display in unevaluated form:
Copy the output and evaluate; the result stays unevaluated:
Use ReleaseHold to force evaluation of the result:
Use Defer to display in unevaluated form:
Copy the output and evaluate:
New in 6