Another Roadside Attraction
me at me.com
Thu Feb 22 23:14:11 PST 2007
I hadn't seen the array initialization syntax with the parenthetized arguments. It's kind of odd-looking. Do know know anything about its etymology? Since arrays already have bracketized declaration syntax, the parenthetized syntax seems like an unnecessary kludge.
Anyhow, the parenthetized syntax doesn't seem to be anywhere on the digital mars website or in any of the dsource tutorials.
Unfortunately, your multi-array library won't work for me, since it relies on templates. I won't know the size of the grid until runtime, so templates are a no-go.
But the ragged arrays should be fine for now.
Bill Baxter Wrote:
> D doesn't have rectangular arrays at the moment. But you can init a
> multi-dim ragged array.
> int bar = new int(5,20,30);
> auto bar = new int(5,20,30);
> I have some nd rectangular array at
> but it sounds like for your purposes the ragged array will be sufficient.
More information about the Digitalmars-d-learn