Qbasicnews.com
while loop and do loop - Printable Version

+- Qbasicnews.com (http://qbasicnews.com/newforum)
+-- Forum: QBasic (http://qbasicnews.com/newforum/forum-4.html)
+--- Forum: QB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-11.html)
+--- Thread: while loop and do loop (/thread-5996.html)



while loop and do loop - rhoward88 - 02-10-2005

im having trouble with integrating a while loop into one of my do loops, is there any way to fix this?


while loop and do loop - Sterling Christensen - 02-10-2005

What do you mean by integrate?

Like this?
Code:
DO
   WHILE b
      ...
   WEND
LOOP UNTIL a



while loop and do loop - TheBigBasicQ - 02-10-2005

posting some code will give us a clue =P We arent telepathic problem solvers :roll:


while loop and do loop - Z!re - 02-10-2005

Code:
Do While a = b
Loop
Code:
Do Until a = b
Loop
Code:
Do
Loop While a = b
Code:
Do
Loop Until a = b
Code:
While a = b
Wend

That about covers it...

The = sign can be replaced with: <=, >=, <>, < or >

You can add multiple conditions using: AND, OR or any other bit operator (XOR for example)