as you know, you can do
to increase the variable by 1.
i understand this:
Code:
new variable;
public repeating_task()
{
variable++;
if(variable > 2) variable = 0;
// do something with variable.
}
and i know how it works in the "for" loops.
what i dont understand is the way im using it here:
Code:
new variable;
public repeating_task()
{
if(variable > 3) variable = 0;
switch(variable++)
{
case 0: // something...
case 1: // something...
case 2: // something...
case 3: // something...
}
}
now in the switch, say the variable was greater than three and it was reset to 0.
does the switch use the increased variable or does the variable increase after the switch?
__________________