Loop in a loop
#1

pawn Код:
for(...)
{
   while(...)
   {
        continue;
   }

}
Will the "continue" continue the while loop? How do I continue the for loop?
Reply
#2

Yes, a continue or break statement only affects the lowest enclosing loop (in your case the while). Depending on what you actually want to do, I suggest just breaking out of the while. But if you have any extra code after the while loop, but within the for loop, you have a problem.
Reply
#3

Maybe you can use GOTO?
Reply
#4

Quote:

How do I continue the for loop

Код:
break;
this concept looks dangerous...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)