I was looking through some old code and stumbled upon this:
1 2 3 4 5
|
for(;;;)
{
commands
...
}
|
What does for loop do? More specifically I would like to know if the middle statement will be evaluated as true or false?
Last edited on
Okay I figured out that this is an infinite for loop, and it does treat the second blank statement as true.
That's one semicolon too many.
true. it's much like
while (1), do / while (true) or for (;;)