??? 08/23/08 13:31 Read: times |
#157688 - Head under arm Responding to: ???'s previous message |
Yes, a bad implementation, resulting from doing online editing with the head under the arm.
I originally wrote it as: unsigned char next[6] = {1,2,3,4,5,0}; unsigned char n = 0; for (;;) { if (pressed) break; n = next[n]; } n = 1 << n; I.e. using the same concept as the second snippet. This is a big danger with editing/posting code on one monitor, and looking at a movie on another :) Directly using the table entries is of course only allowed when they form a closed set within the [0..n) range. |