Thread overview | ||||||
---|---|---|---|---|---|---|
|
November 14, 2013 Multidimensional array in d2? | ||||
---|---|---|---|---|
| ||||
I See that in stack exchange, that it is possible to create multidimensional arrays like : <type> [][] arrayname ; and here : http://homepages.uni-regensburg.de/~nen10015/documents/D-multidimarray.html that such is not possible. I would like to know more about it, and learn about multidimensional arrays in D2, dont find much in official sites. Thank you |
November 14, 2013 Re: Multidimensional array in d2? | ||||
---|---|---|---|---|
| ||||
Posted in reply to seany | On 11/14/2013 01:18 PM, seany wrote: > I See that in stack exchange, that it is possible to create > multidimensional arrays like : > > <type> [][] arrayname ; That works because in C, C++, D, etc. a multi-dimensional array is nothing but a single dimensional array where elements are arrays. > I would like to know more about it, and learn about multidimensional > arrays in D2, dont find much in official sites. I have a short "Multi-dimensional arrays" section here: http://ddili.org/ders/d.en/slices.html That has a passing reference to the following new expression as well: int[][] s = new int[][](2, 3); Ali |
November 14, 2013 Re: Multidimensional array in d2? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ali Çehreli | Oh, this is really nice, thank you very much I also note you have a book http://ddili.org/ders/d.en/index.html (too bad that there are chapters not translated, but thank you very much)! On Thursday, 14 November 2013 at 21:24:25 UTC, Ali Çehreli wrote: > > On 11/14/2013 01:18 PM, seany wrote: > > > I See that in stack exchange, that it is possible to create > > multidimensional arrays like : > > > > <type> [][] arrayname ; > > That works because in C, C++, D, etc. a multi-dimensional array is nothing but a single dimensional array where elements are arrays. > > > I would like to know more about it, and learn about > multidimensional > > arrays in D2, dont find much in official sites. > > I have a short "Multi-dimensional arrays" section here: > > http://ddili.org/ders/d.en/slices.html > > That has a passing reference to the following new expression as well: > > int[][] s = new int[][](2, 3); > > Ali |
November 14, 2013 Re: Multidimensional array in d2? | ||||
---|---|---|---|---|
| ||||
Posted in reply to seany | On 11/14/2013 01:31 PM, seany wrote: > I also note you have a book http://ddili.org/ders/d.en/index.html > (too bad that there are chapters not translated, but thank you very much)! You are very welcome! Just three chapters left and I must add the UDA chapter, which has been one of the most recent additions to the language. :) Also, once approved, I will have to at least mention the upcoming std.allocator in the memory management chapter. Ali |
Copyright © 1999-2021 by the D Language Foundation