Any way to set len and ptr in dyn arrays?
nobody at mailinator.com
Tue Aug 8 05:13:53 PDT 2006
James Dunne wrote:
> This is very interesting and all, but why would you do such a thing?
> Is the .length property on the dynamic array just not cuttin' it for you?
No it is not. The whole raison d'etre for that array is to give
me access to the data in buf. From my reading of the docs it
looks like any case in which the length increases then this
array can be copied and might not point to the data in buf
anymore. So now if I tried to save changes to buf by passing it
to the std.file.write method it would look like nothing happened.
More information about the Digitalmars-d-learn