Hi I started learning Java and am currently trying to learn C++. I have this piece of code and cannot workout what it does. I am assuming it makes the program wait for a certain period of time before it starts. But some further explanation would very useful.
I have added comments to sections for which I would like some further explanation.
for (;;) {
wait (0.02); //What does this do?
if (ab1_On) {
con += 104;
ab1_On = 0; //Why is the value reset to 0?
}
if (ab2_On) {
con += 208;
ab2_On = 0; //Why is the value reset to 0?
}
con++;
if (con > 311) {
con -= 312;
}
for (int i=0; i<3; i++) {
bright[i] = brilvl (con + (i * 104));
}
}
}