Mathematica 9 is now available
 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]=



    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.