.ptr and .value
bearophile
bearophileHUGS at lycos.com
Wed May 5 16:11:48 PDT 2010
Robert Clipsham:
> .ptr is only available for arrays.
And arr.ptr returns the pointer to the start of the memory that contains the array data. While &arr is the pointer to the struct that contains the pointer and the length.
> As for .value and .deref, these won't be implemented, you'll
> have to live with & and * if you want to use pointers. Note that if
> you're using pointers you should be comfortable with them, if you're not
> it's probably best to avoid them. In fact, D makes it easy to do so!
On the other hand I think the Pascal pointer syntax is better :-)
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list