On 7 March 2012 19:30, H. S. Teoh <hst...@quickfur.ath.cx> wrote: >> On 03/06/2012 10:05 PM, ixid wrote: >> > Ah, thank you, so it's wrapping. That seems like a bad idea, what is >> > the benefit to size being unsigned rather than signed? >> > This case would seem like one where allowing negatives is clearly >> > better and more intuitive.
Because you don't describe things as -5 metres tall, so you don't describe things as -1024 bytes long. size_t makes sense unsigned because negatives make no sense for size. However, if you cast array.length to an int, it may work, haven't tested it. -- James Miller