[Answered]Loops / Using "break"
#2

This is an endless loop as
Var1=Var2
is always true (you assign Var2 to Var1).

What you want to do is
Var1==Var2
which compares both values.

The code after the loop is executed when the loop has ended.

"break;" is the command to stop a loop.
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)