I didn't even think about the mod operator. Although you would have to use counter%51. counter%50 would change the value of counter to zero once is hits 50 so the if statement would never evaluate to true.
For those of you who have no clue what the % ("mod") symbol is, I will explain. This may not be the best or clearest explanation but I will try. If anyone wants to reply with clarification, please feel free too.
Now then:
The modulus operator %(percent sign).
Mod will actually subtract the multiples of a number from another number. For example, if you were to do 150 % 50, you would get a result of zero. Reason is because 150 has 3 multiples of 50 in it. So 150-(3*50) = 0. If it were 153%50 instead, the answer would be 3 since 153-(3*50)=3. For extra clarification, let's do one more. 23 % 7. Well if you continue to take multiples of 7 without going over 23, you find that the closest you can get is 21 (i.e. 3 multiples of 7). So 23 - (3*7) = 2.
Now what this number actually represents is the integer remainder of division. So 23/7 would be 3 2/7. So the remainder 2/7 is taken and the numerator is your Mod result.
In the case with the arrows(in the code above), what this does is keep the value of the variable counter to a number in the range of 0 to 50. Once it reaches a value of 50, the if statement is true, code is executed in the corresponding statement block and counter gets reset to 0.
All this should probably go in the coding section but I figured since it was brought up, I would shed some light on it for those who didn't know. I try to be as helpful as I can since I know I have received a lot of help from other people on here.


Making the world better, one mouse click at a time. -- DETAILS -- version:.... commercial 6.31.4/WED V6.269 OS:......... Windows XP pro processor:. 2.8 GHz P4 RAM:....... 1 GB