Arbortext IsoDraw > Macro Language Reference > Introduction > Language Basics > Flow Control Statements > While
  
While
In a WHILE loop, if the expression evaluates as true, the statement is executed and then the expression is reevaluated. If it is true again the body of the loop is executed and so on. The loop exits when the expression is evaluated as false.
WHILE(expression)statementsEND WHILE
expression
Boolean expression that evaluates to TRUE or FALSE
statements
One or more Arbortext IsoDraw Macro Language statements.
Following is a simple example that prints 10 parallel vertical lines on the screen:
DEFINE i AS integer
i = 1
WHILE (i <= 10)
CREATE LINE 5*i 0 5*i 50
i = i + 1
END WHILE
Like the IF statement you can also nest the WHLE statement:
WHILE (expression)
#do something several times
WHILE (expression)
#do something different
END WHILE
END WHILE