TrueQ

TrueQ[expr]
yields True if expr is True, and yields False otherwise.

DetailsDetails

  • You can use TrueQ to "assume" that a test fails when its outcome is not clear.
  • TrueQ[expr] is equivalent to If[expr, True, False, False].

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

TrueQ will return True only if the input is explicitly True:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
New in 1
New to Mathematica? Find your learning path »
Have a question? Ask support »