Wolfram Language & System 10.4 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

SameQ


yields True if the expression lhs is identical to rhs, and yields False otherwise.

DetailsDetails

  • SameQ requires exact correspondence between expressions, except that it still considers Real numbers equal if they differ in their last binary digit.
  • gives False.
  • gives True if all the are identical.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Test whether two expressions are identically the same:

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

remains symbolic unless literal values are given:

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

Full form:

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