This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Built-in Functions / Input and Output / Formatting Functions  /
HoldForm

  • HoldForm[ expr ] prints as the expression expr, with expr maintained in an unevaluated form.
  • HoldForm allows you to see the output form of an expression without evaluating the expression.
  • HoldForm has attribute HoldAll.
  • HoldForm is removed by ReleaseHold.
  • See the Mathematica book: Section 2.5.5Section 2.8.6.
  • See also: ToString, WriteString.

    Further Examples

    Like Hold, HoldForm keeps expressions unevaluated, but it is invisible in standard Mathematica output form.

    In[1]:=

    Out[1]=

    In[2]:=

    Out[2]=

    You can see that it is there with FullForm.

    In[3]:=

    Out[3]//FullForm=

    The function ReleaseHold removes Hold and HoldForm, allowing the expressions they contain to evaluate.

    In[4]:=

    Out[4]=