On Wed, Jan 08, 2020 at 09:09:23AM +0100, Robert M. Münch via
Digitalmars-d-learn wrote:
> On 2020-01-07 19:06:09 +, H. S. Teoh said:
>
> > It's up to you how to implement all of this, of course. The language
> > itself doesn't ship a built-in type that implements this, but it
> > does provid
On 2020-01-07 19:06:09 +, H. S. Teoh said:
It's up to you how to implement all of this, of course. The language
itself doesn't ship a built-in type that implements this, but it does
provide the scaffolding for you to build a custom multi-dimensional
array type.
Hi, thanks for your extensiv
On Tue, Jan 07, 2020 at 06:38:59PM +0100, Robert M. Münch via
Digitalmars-d-learn wrote:
> I read all the docs but I'm not toally sure. Is it that [x][y] is a 2D
> array-index, where as [x,y] is a slice?
arr[x][y] is indexing an array of arrays.
arr[x,y] is indexing an actual multi-dimensional ar
On 2020-01-07 17:42:48 +, Adam D. Ruppe said:
So [x][y] indexes an array of arrays.
Yes, that's what I understand. And both can be dynamic, so that I can
have a "flattering" layout where not all arrays have the same length.
[x,y] indexes a single array that has two dimensions.
Does
On Tuesday, 7 January 2020 at 17:38:59 UTC, Robert M. Münch wrote:
I read all the docs but I'm not toally sure. Is it that [x][y]
is a 2D array-index, where as [x,y] is a slice?
So [x][y] indexes an array of arrays. [x,y] indexes a single
array that has two dimensions.
This can be kinda conf
I read all the docs but I'm not toally sure. Is it that [x][y] is a 2D
array-index, where as [x,y] is a slice?
But the example in docs for opIndexAssign uses the [x,y] syntax, which
is confusing:
```
struct A
{
int opIndexAssign(int value, size_t i1, size_t i2);
}
void test()
{
A a;