e><code>matrix[2, 3] yss;
for (y in yss)
   ... do something with y...</code></pre>
<p>In both cases, the loop variable <code>y</code> is of type <code>real.  The elements of the matrix are visited in column-major order (e.g.,</code>y[1, 1]<code>,</code>y[2, 1]<code>,</code>y[1, 2]<code>, ...,</code>y[2, 3]<code>), whereas the elements of the two-dimensionl array are visited in row-major order (e.g.,</code>y[1, 1]<code>,</code>y[1, 2]<code>,</code>y[1, 3]<code>,</code>y[2, 1]<code>, ...,</code>y[2, 3]`).</p