This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

ValueQ

ValueQ[expr]
gives True if a value has been defined for expr, and gives False otherwise.
  • ValueQ gives False only if expr would not change if it were to be entered as Mathematica input.
Only the one argument form of has values associated with it:
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]=
Values of symbols:
Function definitions:
Conditional definitions; the result depends on the argument:
Here x is evaluated before ValueQ sees it:
Use Unevaluated to preserve the HoldAll attribute:
Pi evaluates to itself:
Use NumericQ to find out whether there is a numerical value defined:
ValueQ returns True if any evaluation takes place, even though does not match here:
New in 1