Inactive

Inactive[f]
is an inactive form of f.

DetailsDetails

  • Inactive[f][args] is effectively a purely symbolic form of f[args], in which no evaluation associated with f is done.
  • Inactive is conveniently inserted into expressions using Inactivate.
  • Inactive[f] displays in StandardForm, with f or any special output form associated with f shown in gray.
  • Inactive does not affect TraditionalForm.
  • Inactive has the attribute HoldFirst and does not evaluate its first argument.
  • Inactive[atom] gives atom for atoms other than symbols.

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Inactive Length:

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

Evaluate the expression:

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

Inactivate Plus:

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

Display equality of activated and inactivated forms:

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

Inactive objects are grayed out in StandardForm:

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

But not in TraditionalForm:

In[2]:=
Click for copyable input
Out[2]//TraditionalForm=
Introduced in 2014
(10.0)
Translate this page: