On Mon, 12 Jan 2015 16:53:59 +0000
Oleg via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote:

> On Monday, 12 January 2015 at 16:44:42 UTC, ketmar via 
> Digitalmars-d-learn wrote:
> > nope, it means exactly what is written there. except that 
> > dynamic array
> > is represented by struct like this:
> >
> >   struct {
> >     void *dataptr;
> >     size_t itemCount;
> >   }
> >
> > this is what D calls "dynamic array", and this is what passed 
> > by value:
> > struct with two members. dynamic array contents are *not* a 
> > part of
> > "dynamic array type".
> >
> > yes, this is confusing.
> 
> Thank you.
be careful with chaning dynamic array length though. it won't be seen
outside of function, as Adam wrote. and it can cause some side-effects
like partially modifyed array (if you modified some array elements and
then changes length, which causes reallocing).

Attachment: signature.asc
Description: PGP signature

Reply via email to