AFAIK, no. But you can easily do a[1..2][3..4], which doesn't look too ugly IMO.<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 19, 2012 at 10:04 PM, H. S. Teoh <span dir="ltr"><<a href="mailto:hsteoh@quickfur.ath.cx" target="_blank">hsteoh@quickfur.ath.cx</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm experimenting with implementing "true" multidimensional arrays in D.<br>
It's actually very nice, compared with the hassle of memory management<br>
in C/C++, and it even lets you give opIndex multiple parameters so that<br>
you can write things like arr[1,2] instead of the uglier arr[1][2] (or<br>
worse, arr[2][1]).<br>
<br>
Two questions, though:<br>
<br>
1) Is multidimensional slicing supported? I.e., does opSlice support<br>
notation like arr[1..2, 2..3]?<br>
<br>
2) Is opDollar supported for multidimensional arrays? I.e., when you<br>
write arr[1..$, 2..$], the $ in each dimension can potentially be<br>
different values (say you have a 2x3 array, so the first $ is 2, and the<br>
second $ is 3)?<br>
<br>
D will totally rock if these features are supported.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
T<br>
<br>
--<br>
Today's society is one of specialization: as you grow, you learn more<br>
and more about less and less. Eventually, you know everything about<br>
nothing.<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Bye,<br>Gor Gyolchanyan.<br>
</div>