ValueQ

ValueQ[expr]
gives True if a value has been defined for expr, and gives False otherwise.

DetailsDetails

  • ValueQ has attribute HoldFirst.
  • ValueQ gives False only if expr would not change if it were to be entered as Wolfram Language input.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

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

Only the one argument form of has values associated with it:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
Introduced in 1988
(1.0)