2 ms·
Yes, but my point was that the solution is to use a closed range instead; in this case, use `i <= 255` as the loop condition. Another solution, of course, is to
by Sharlin 8y ago
Yes, but my point was that the solution is to use a closed range instead; in this case, use `i <= 255` as the loop condition. Another solution, of course, is to widen the type of your induction variable.
- toast0 8y agoBut that doesn't work here either -- 255 + 1 = 0, and 0 <= 255, so you still loop forever.