Any way to set len and ptr in dyn arrays?
nobody
nobody at mailinator.com
Tue Aug 8 04:25:41 PDT 2006
Tom S wrote:
> nobody wrote:
>> theArray.myArrayInternals.len = buf[0] * buf[1];
>> theArray.myArrayInternals.ptr = &buf[2];
>
> erm ...
>
> foo = (&buf[2])[0 .. buf[0] * buf[1]];
Thanks for your answer. I understand that would ultimately have
the same result. My question is about whether that directly sets
the len and ptr fields or are does more stuff happen. If so what
is it? If not then why is there no direct access to the ptr and
len fields?
More information about the Digitalmars-d-learn
mailing list