DisableFormatting

DisableFormatting[expr]

is a form that disables the formatting of expr when it appears inside held expressions, but gives expr as soon as evaluation occurs.

Details

Examples

open allclose all

Basic Examples  (3)

Prevent an expression from formatting:

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

Release the hold to let it format:

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

Prevent an unevaluated expression from formatting:

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

Releasing the hold allows evaluation and, subsequently, formatting to occur:

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

DisableFormatting must appear inside held expression or it will evaluate away:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]//FullForm=

Scope  (3)

Properties & Relations  (5)

See Also

Hold  HoldComplete  HoldForm  InputForm  Defer  Inactivate

Introduced in 2016
(11.0)