On Fri, 18 Jun 2010 01:25:32 -0400, Chick Corea <chick.zco...@gmail.com> wrote: > Those are the result of code that I pulled directly from the D v1 docs from > > http://www.digitalmars.com/d/1.0/arrays.html > > Specifically, the code is this. > > int* p; > int[3] s; > int[] a; > p = s; > p = a; >
I can't speak as to why the D2 code doesn't work, but this example in the documentation is flat out wrong. To assign a D array to a pointer, you must use the .ptr property, so that the correct code is actually: int* p; int[3] s; int[] a; p = s.ptr; p = a.ptr; Hope this clears things up.