<br><br><div><span class="gmail_quote">On 10/1/07, <b class="gmail_sendername">Martin Ahnelöv</b> &lt;<a href="mailto:operagasten@gmail.com">operagasten@gmail.com</a>&gt; wrote:</span><div><br>&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Eh? What are you... Hm... Okay, I can see your point now. You&#39;re right.<br>Since we are dealing with arrays, every array inside foo[i] will be of<br>equal length; it&#39;s not like we are dealing with lists where every slot
<br>is just a reference to another object.<br><br>Good thinking there.</blockquote><div><br><br>It gets very useful. Suppose we have two positive integers X and Y in a file so that;<br>-----------------------------------------------------------
<br>array[X][Y] @=&gt; Foo.foo_array;<br>Foo foo;<br><br>public class Foo<br>&nbsp; {<br>static int foo_array[][];<br><br>fun void bar(int blah)<br>&nbsp; &nbsp; {<br>&nbsp;&nbsp;&nbsp; ................<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp; }<br></div>----------------------------------------------------------
<br><br>Because Foo is a public class holding a static array the array needs to be instantiated outside of the class or there will be errors. Now if Foo.bar() does something to that array it becomes quite important to determine what it&#39;s dimensions are, however, both X and Y are outside of Foo&#39;s namespace and it&#39;s quite possible that there will be many instances of Foo that are in different files altogether which won&#39;t have X or Y.
<br><br>At that point the .cap()&#39;s of multi-dimensional arrays become very interesting so I thought I&#39;d share because it&#39;s not in the manual nor does my workaround look very nice. Also; this took a while to figure out and it makes no sense for others to spend that time too.
<br><br>Yours,<br>Kas.<br></div>