DarkBASIC has several types of loops, each of which has its own unique way of defining the starting and ending points of the loop. Each statement dictates a different starting and ending point for a loop. As I mentioned briefly at the beginning of the chapter, there are four looping statements in DarkBASIC:
FOR . . . NEXT
DO . . . LOOP
REPEAT . . . UNTIL
WHILE . . . ENDWHILE
The main difference among these statements is the condition each one uses to determine when the loop is finished. What is a condition? It is a programming statement that resolves to either a true or false answer. Each iteration through a loop is determined by a condition; if the condition is true, then the loop ends and the program continues. Table 5.1 ...