In this bit of code:

<b>
for X = 1 to 100
number = number + 1001
next X
</b>

Eventually the number will be higher than 65535 so what happens to the number? I assume some internal calculation is going to drop it back down to 0 + something and it will start again.

How does the program/pic circuit handle this?

As with my random number questions does this number automatically cycle through all possible numbers between 1 and 65535?

Thanks.

Bart