QBasic: Looping

January 15, 2010

In programming, loops are used to repeat an instruction for as much as needed. There are a few ways to loop in BASIC:

– IF THEN GOTO
– DO LOOP WHILE/UNTIL
– WHILE WEND

An example of the IF THEN GOTO loop can be found here where we used those commands to check for a triangle. The program will keep on asking for the right values to enter (the ones of a real triangle) thus creating a loop that’s stopped when the right values are entered.
Read the rest of this entry »

Advertisements