[Answered]Loops / Using "break"
#1

Heyho!
I've got a little question here. First an example:
pawn Код:
Var1=4;
Var2=4;

Var3=0;

while(Var1==Var2)
{
if(Var3>=Var2)break;
Var3++;
}

Var4=Var3;
1. Will the code after the loop be executed, when the loop is stopped?
2. Does it work to use "return 0;" for stopping a loop?
3. If yes, will the code after the loop be executed?
4. Is there a other way to stop the loop, except changing one of the "while"-conditions (here Var1 or Var2)?

Thanks,
DeathOnaStick
Reply


Messages In This Thread
[Answered]Loops / Using "break" - by DeathOnaStick - 29.01.2010, 14:06
Re: [Question]Loops / Using "break" - by ray187 - 29.01.2010, 14:10
Re: [Question]Loops / Using "break" - by DeathOnaStick - 29.01.2010, 14:12
Re: [Question]Loops / Using "break" - by ray187 - 29.01.2010, 14:13
Re: [Question]Loops / Using "break" - by DeathOnaStick - 29.01.2010, 14:14
Re: [Question]Loops / Using "break" - by ray187 - 29.01.2010, 14:22
Re: [Question]Loops / Using "break" - by DeathOnaStick - 29.01.2010, 14:24
Re: [Question]Loops / Using "break" - by Rac3r - 29.01.2010, 14:47
Re: [Question]Loops / Using "break" - by ray187 - 30.01.2010, 10:57
Re: [Question]Loops / Using "break" - by MadeMan - 30.01.2010, 11:28

Forum Jump:


Users browsing this thread: 1 Guest(s)