>bleh I'm too lazy to read all of that, but the wrapping is correct. The reason why it does this can be seen if you think of an integer in binary. If the max it can hold is 32767 (all 1s), then adding 1 to that value in binary would require setting the next most significant bit to 1 and all previous bits to 0. However, there is no next most significant bit, so the 1 falls off, leaving us with the rest, which is just 0.
- Natural behavior of integers Richard Lindsey
- Re: Natural behavior of integers Mike Barton
- Re: Natural behavior of integers mrpotatohead
- Re: Natural behavior of integers Mark Roberts
- Re: Natural behavior of integers Mark Roberts

