DO

DO [ WHILE Expression ]

Begins an infinite loop structure delimited by DO ... LOOP instructions. If WHILE is specified, the loop is stopped when Expression is false. If expression is false to begin with, the loop is not executed at all.


Example

PUBLIC SUB Form_Open()

  DIM a AS Integer

  a = 1 

  DO WHILE a <= 10 
    PRINT "Hello World"; a
    INC a
  LOOP

END


See also

BREAK, CONTINUE, FOR, FOR EACH, LOOP, REPEAT, UNTIL, WHILE, WITH


Previous: Dir$ Next: ELSE