(0 == ButtonCount(BTNCENTER,true)) is basically a conditional statement. The value is true if the center button is NOT pressed, and false if it IS pressed.
For what code there is, I would say that it does the following.
Code: Select all
...................................................................
while (0 == ButtonCount(BTNCENTER,true)) //as long as the center button is NOT pressed, repeat the following code.
{
if (ButtonCount(BTNLEFT,true) && N > 0) //if variable N is greater than 0, AND the left button is pressed, variable N is reduced by one.
{
N--;
}
if (ButtonCount(BTNRIGHT,true) && N < 10) //if variable N is less than 10, AND the right button is pressed, variable N is increased by one.
{
N++;
}
......................................................................
The apparent purpose, is to be able to increase or decrease a variable (N) using the buttons, but limiting it to the 0-10 range.
I see one major flaw. There is nothing to wait until the button is released, so it would zoom through it so fast (and so many times) that the only likely states for variable N would be 0 or 10, not likely to be in between.
This is not a complete program, so it is hard to say anything is for sure.