Rectangular Arrays

mike vertex at gmx.at
Fri Feb 23 08:02:27 PST 2007


Am 23.02.2007, 07:37 Uhr, schrieb Bill Baxter <dnewsgroup at billbaxter.com>:

> D doesn't have rectangular arrays at the moment.  But you can init a  
> multi-dim ragged array.
>
> http://www.digitalmars.com/d/expression.html#NewExpression
>
> int[][][] bar = new int[][][](5,20,30);
> or
> auto bar = new int[][][](5,20,30);
>

That's interesting ... I use two-dim arrays, like

' byte[bufferCount][bufferLength]

and didn't even know this syntax, but apparently it works. Need to take a  
look at what exactly I did, I can't remember and don't have my code on  
this machine here.

-mike

-- 
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/


More information about the Digitalmars-d-learn mailing list