Executes Statements repeatedly while the specified bool-exp is True.
While bool-exp [Do]
Statements
Endwhile
ATEasy first evaluates the bool-exp. If the result is zero, the control is transferred to the statement that follows the Endwhile. Otherwise, Statements are executed and the While...Endwhile statement is executed again. The Do statement is optional.
i=0
While i < 2
i=i+1
Print i;
EndWhile
! i is now 2
! This will print 1 2