array and pointers

Anders F Björklund afb at algonet.se
Thu Jan 25 10:49:01 PST 2007


Frits van Bommel wrote:

> Nitpick: the members are the other way around :p. (in DMD)
> Not that it usually matters, but this may come up when writing inline 
> assembly or calling extern(C) functions.
> This is not in the spec though, so it's implementation-dependent.

If you're going to nitpick, then it's implemented as a ulong
(32-bit length | 32-bit ptr) in DMD and as a struct in GDC...
This makes a difference for return values. Or when debugging.
And it definitely will later, when D supports 64-bit as well.

But most of the time, you can just use .length and .ptr :-)

--anders


More information about the Digitalmars-d-learn mailing list