Inactivate

Inactivate[expr]

replaces all instances of f with Inactive[f] for symbols f used as heads in expr.

Inactivate[expr,patt]

inactivates all symbols in expr that match the pattern patt.

Details and Options

  • Inactivate has attribute HoldFirst, and symbols in expr are inactivated before evaluation.
  • With the option setting Heads->False, Inactivate does not enter heads of expressions and inactivate their parts.

Examples

open allclose all

Basic Examples  (3)

Inactivate an expression:

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

Activate it:

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

Inactivate an expression with several terms:

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

Activate different parts of the expression:

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

Inactivate a symbol in an expression:

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

Evaluate the expression:

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

Scope  (5)

Options  (1)

Applications  (5)

Properties & Relations  (5)

Neat Examples  (1)

See Also

Inactive  Activate  Unevaluated  Hold  HoldForm

Introduced in 2014
(10.0)