Awesome, that worked. <br>And thanks, I wasn't aware of d.learn.<br><br><br><br><div class="gmail_quote">On Sun, Aug 15, 2010 at 9:33 PM, Jonathan M Davis <span dir="ltr"><<a href="mailto:jmdavisprog@gmail.com">jmdavisprog@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On Sunday 15 August 2010 19:20:12 Seth Hoenig wrote:<br>
</div><div><div></div><div class="h5">> What I really want is something like this:<br>
><br>
> auto s = args[1];<br>
> auto t = args[2];<br>
> auto d = new int[s.length][t.length];<br>
><br>
> but the compiler complains with the error: Error: Integer constant<br>
> expression expected instead of s.length<br>
><br>
> So then I try to fudge it with something like:<br>
><br>
> auto d = new int[][t.length];<br>
> d.length = s.length;<br>
><br>
> But then accessing elements of d throws an exception:<br>
> core.exception.RangeError@Lev(7): Range violation<br>
><br>
> Soo.. how am I supposed to make a matrix when I don't know the dimensions<br>
> at compile time?<br>
<br>
</div></div>Oh, and questions like this are generally supposed to go on the D.Learn list.<br>
This list is more for discussing language features and the direction of the<br>
language rather than asking and answering questions about how to use D.<br>
<font color="#888888"><br>
- Jonathan M Davis<br>
</font></blockquote></div><br>