Maulin, you explained it very well indeed! And thanks also to Ilja.
So this is why the range of byte is -2(power of 7) to 2(power of 7) minus one.
excellent. i see!
So I know a search on two's complement would be apropriate here, but i will just take the time to suggest this...
Seeing the range of a short is -2 (power of 15) to 2 (power of 15) minus one, if a short was counted up in an iterative loop, eventually it would get reset too...let me see here...-32,768! It would get counted up to 32,767 and then be reset (the highest of the short's 16 bits being used for the sign bit).
and an int would get reset at 2,147,483,647 back to -2,147,483,648 ....the highest of the int's 32 bits being used for the sign bit.
[ January 15, 2003: Message edited by: Jasper Vader ]