+ 3

What means this for condition?

for(; ;).

9th Feb 2017, 11:16 PM
Gustave A C/D C ☢️ 🛸🛸🛸
Gustave A C/D C ☢️ 🛸🛸🛸 - avatar
3 odpowiedzi
+ 19
It means that for-loop will run forever. Usually there is condition in such loops to break them.
9th Feb 2017, 11:23 PM
Igor Makarsky
Igor Makarsky - avatar
+ 8
This for has no counter initialized, no condition to end, and no incrementer or decrementer. Even though they aren't written there, the semicolons still need to be placed. It functions like while(true) and will run forever (or at least until it hits a break statement).
9th Feb 2017, 11:25 PM
Tamra
Tamra - avatar
+ 2
thanks for answering.
14th Feb 2017, 11:22 PM
Gustave A C/D C ☢️ 🛸🛸🛸
Gustave A C/D C ☢️ 🛸🛸🛸 - avatar