I was looking though a fellow developers code when I saw this ..
for (;;){
....
....
....
}
I have never seen “;;” used in a loop. What does this do exactly?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It loops forever. ‘;;’ equates to no start value, no stop condition and no increment condition.
It is equivalent to
There would usually be a conditional
break;statement somewhere in the body of the loop unless it is something like a system idle loop or message pump.