Comparisons

Comparison operations are supported by all objects:


\begin{tableiii}{\vert c\vert l\vert c\vert}{code}{Operation}{Meaning}{Notes}
\...
...}{object identity}{}
\lineiii{is not}{negated object identity}{}
\end{tableiii}
operatorcomparison == is is not

Notes:

(1)
<> and != are alternate spellings for the same operator. (I couldn't choose between and ! :-) language language

Objects of different types, except different numeric types, never compare equal; such objects are ordered consistently but arbitrarily (so that sorting a heterogeneous array yields a consistent result). Furthermore, some types (e.g., windows) support only a degenerate notion of comparison where any two objects of that type are unequal. Again, such objects are ordered arbitrarily but consistently. typesnumeric objectscomparing

(Implementation note: objects of different types except numbers are ordered by their type names; objects of the same types that don't support proper comparison are ordered by their address.)

Two more operations with the same syntactic priority, in and not in, are supported only by sequence types (below). in not in