Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > Tuning & Debugging > Symbol Handling > ValueQ >
Mathematica > Core Language > Package Development > Namespace Management > Symbol Handling > ValueQ >

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
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF