* Frank:
I am reading other people's code and come across this statement.
Does it mean phase revolve arround 0,1,2 and 3 & 3 makes 0?
Thank you.
phase = 0;
for (i = 0; i <= 100; i++) {
phase=(phase+1)&3;
}
For integer types '&3' is effectively the same as '%4'.
I.e. for such types the code should yield 101%4 = 1.
If 'phase' is of a user-defined type then nothing can be said.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?