Home > lang > while 
 en fr de es it nl pl pt pt_BR mk sq hu cs tr ar fa id vi ko ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Search  Administration  
Documentation  
Warning! This page is not translated.  See english version 
WHILE
WHILE Expression

Begins a loop structure delimited by WHILE ... WEND instructions.

The loop is repeated while Expression is true.

If the expression is false, the loop is never executed at all.

The DO WHILE ... LOOP structure is an equivalent.

Example

PUBLIC SUB Form_Open()

  DIM a AS Integer

  a = 1

  WHILE a <= 10
    PRINT "Hello World"; a
    INC a
  WEND

END

See also

Loop Control Structures