Quick question on what this statement does
I found this code from another source, and I was just wondering if I can get a quick explanation on what it does exactly.
"skip" is an int data type. This statement is also in a while loop.
|
skip = skip == 2 ? 0 : skip + 1;
| |
Thanks for the help.
It increments skip mod 3, so it's equivalent to the much better skip = (skip + 1) % 3;
Oh. That makes more sense. Thank You!
Topic archived. No new replies allowed.