next up previous contents index
Next: Translating null Up: Basic translation Previous: Translating instanceof   Contents   Index


Translating reference equality

The scheme for translating the reference equality operators == and !=, applied to multiarrays is illustrated in Figure A.43.

Because there is no single Java reference to a multiarray (or, equivalently, because a multiarray is not considered to be an object) there is no obvious, a priori definition for reference equality between multiarrays. The translations given here can be read as definitions.

One consequence of these definitions, together with the translation for array sections given in section A.4.13, is that an array section in which every subscript is the default triplet : is considered to be identical (in the sense of reference equality) to its parent array.

Figure A.44: Translation of null in multiarray contexts.
\begin{figure}\textbf{SOURCE:}
\begin{eqnarray*}
e & \equiv & \verb$null$
\end{e...
...he expected multiarray expression.} \\
\end{array}\end{displaymath}\end{figure}



Bryan Carpenter 2003-04-15