There are four looping statements available in DarkBASIC, and it’s important to understand the strengths and weaknesses of each, how they compare with each other, and when each type of loop is preferable. The four looping statements are
FOR . . . NEXT. This loop iterates a specific number of times.
DO . . . LOOP. This loop is endless.
REPEAT . . . UNTIL. This loop repeats until a condition is met.
WHILE . . . ENDWHILE. This loop repeats while a condition remains true.
I’ll explain each of these statements in detail shortly. In the meantime, I’d like to provide you with a little background information.
A loop can be defined as anything that repeats something over and over. It has a starting point ...