which will be stoped?
#1

hi all...

i have a question here. if i make a loop inside of loop, and then i break the second loop. will it stop the first loop?

i meant like this

pawn Код:
new i;
while(i < 100)
{
          for(new c; c < 20; c++)
          {
                  if(player[c] == 1) break;
          }
}
will it stop the "while" loop? or only stop the "for" loop?
Reply
#2

It'll stop the "for"
Reply
#3

Quote:
Originally Posted by AiRaLoKa
Посмотреть сообщение
hi all...

i have a question here. if i make a loop inside of loop, and then i break the second loop. will it stop the first loop?

i meant like this

pawn Код:
new i;
while(i < 100)
{
          for(new c; c < 20; c++)
          {
                  if(player[c] == 1) break;
          }
}
will it stop the "while" loop? or only stop the "for" loop?
the "for"
Edit: Always late tho :/
Reply
#4

thanks all

+REP for all
Reply
#5

Quote:
Originally Posted by AiRaLoKa
Посмотреть сообщение
thanks all

+REP for all
np bro
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)