Am 15.02.2011 15:18, schrieb spir:
On 02/15/2011 02:01 PM, Daniel Gibson wrote:
Am 15.02.2011 12:50, schrieb spir:
On 02/15/2011 03:44 AM, Piotr Szturmaj wrote:
spir wrote:
Rename size-t, or rather introduce a meaningful standard alias? (would
vote for Natural)

Maybe ptrint and ptruint?

If ptr means pointer, then it's wrong: size-t is used for more than
that, I guess. Strangely enough, while "size" may suggest it, .length
does not return a size_t but an uint.

Denis

.length of what? An array?
I'm pretty sure it returns size_t.

unittest {
int[] ints; auto l = ints.length;
writeln(typeof(l).stringof);
}
press play ;-)

denis

void main() {
  size_t x;
  writefln(typeof(x).stringof);
}
try this, too ;-)

Because it's an alias the information about size_t gone at runtime and the "real" type is shown. uint in your case. (Here - gdc on amd64 - it's ulong).

Cheers,
- Daniel

Reply via email to