bas7advr.hlp (Topic list)
DO...LOOP Statement Details
  Syntax  Details  Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
DO...LOOP repeats a block of statements while a condition is true or
until a condition becomes true.
 
Syntax 1
  DO [{WHILE | UNTIL} condition]
      [statementblock]
  [EXIT DO]
      [statementblock]
  LOOP
 
Syntax 2
  DO
      [statementblock]
  [EXIT DO]
      [statementblock]
  LOOP [{WHILE | UNTIL} condition]
 
    ■ EXIT DO is an alternative exit from a DO...LOOP. EXIT DO
      transfers control to the statement following the LOOP statement.
      When used within nested DO...LOOP statements, EXIT DO transfers out
      of the immediately enclosing loop. EXIT DO can be used only in a
      DO...LOOP statement.
 
Usage Notes
    ■ You can use a DO...LOOP statement instead of a WHILE...WEND
      statement. The DO...LOOP is more versatile because it can test
      for a condition at the beginning or at the end of a loop.