While within while query

BlitzMax Forums/BlitzMax Beginners Area/While within while query

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I have the following code that doesn't exit when I hit ESCAPE.It should quit when Escape is hit but it doesn'.It's a while loop within a while loop.It appears that the second while loop takes over and the code doesn't check for the escape key.Is this the correct way for while to behave.Shouldn't blitz check the first while loop continually ?


Graphics 800,600
text$=" test....................................................................."


While Not KeyHit(KEY_ESCAPE)
While x <=20000
Cls
DrawText text,tickerx#,260
If MilliSecs() > FrameTimer + 100
FrameTimer = MilliSecs()
frame:+1
EndIf
x :+ 1
tickerx=tickerx-5
Flip
Wend
wend