Dynamic array length ABI unit

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 16 04:54:35 PDT 2014


""Luís Marques " wrote in message 
news:fykakpufqivskbnusxgl at forum.dlang.org...
>
> Regarding the D ABI, http://dlang.org/abi.html , I've noticed that the 
> description for dynamic arrays seems ambiguous:
>
>      offset   property  contents
>      0        .length   array dimension
>      size_t   .ptr      pointer to array data
>
> Couldn't "array dimension" be either in bytes or in T units, for a T[]? It 
> seems to be in bytes (I had assumed it was in T units). If you agree that 
> it is ambiguous, please tweak the description to be more precise.

It _is_ in T units.  It is exactly the dimension of the array, not the size 
in memory. 



More information about the Digitalmars-d mailing list