Hi all,
I have several questions I cannot find elsewhere:
1 - Using inline assembly, how can I access the "ptr" attribute of an array?
For example:
void main() {
int[] array;
asm {
mov EAX, array.ptr;
}
}
The compiler says: "identifier expected".
2 - Is Ddoc working for templates? If it is, I can't make it generate the
documentation for some template functions...
3 - Is there a way to manually increment the index of a foreach loop? I ask
this because the index cannot be made inout,
only the value.
Thanks,

2 - Is Ddoc working for templates? If it is, I can't make it generate the
documentation for some template functions...
3 - Is there a way to manually increment the index of a foreach loop? I ask
this because the index cannot be made inout,
only the value.

Thus on a 64bit system, an array may only contain (2^32 - 1) elements
and every access suffers from a bad alignment of the data pointer?

The whole ABI needs a rewrite in terms of pointer size rather than fixed
offset.

Walter's ABI and Phobos are going to require quite a bit of a makeover
if they are ported to a non-32bit system. A sample:
Phobos: dmd/src/phobos/internal/aaA.d:454
long _aaValues(AA aa, size_t keysize, size_t valuesize)
GPhobos(from gdc): d/phobos/internal/aaA.d:456
Array _aaValues(AA aa, size_t keysize, size_t valuesize)

Yup. Fortunately, most of the pointer size-related diffs between Phobos
and GPhobos are in this file, so the changes shouldn't be too onerous.
Particularly since they can all be revealed by a diff between the two.
Sean

Huh. I could've sworn it used to work that way... but no matter, I just wrote
the
following and it worked fine (DMD 0.164):
(...)
Turns out the 'inout' isn't neccessary anyhow. This prints, as I expected:
(...)

Thanks! It must've been my fault, perhaps I was doing something wrong and I
couldn't get it to work.
Thomas Kuehne wrote: