<A NAME=WHILE>
<TITLE>WHILE</TITLE></A>
<b><a href=r37_idx.html>INDEX</a></b><p><p>
<B>WHILE</B> _ _ _ _ _ _ _ _ _ _ _ _ <B>command</B><P>
<P>
<P>
<P>
The <em>while</em> command causes a statement to be repeatedly executed until a
given condition is true. If the condition is initially false, the statement
is not executed at all.
<P> <H3>
syntax: </H3>
<P>
<P>
<em>while</em><condition> <em>do</em> <statement>
<P>
<P>
<P>
<condition> is given by a logical operator, <statement> must be a
single REDUCE statement, or a
<A HREF=r37_0038.html>group</A> (<em><<</em>...<em>>></em>) or
<A HREF=r37_0040.html>begin</A>...<em>end</em>
<A HREF=r37_0041.html>block</A>.
<P>
<P>
<P> <H3>
examples: </H3>
<P><PRE><TT>
a := 10;
A := 10
while a <= 12 do <<write a; a := a + 1>>;
10
11
12
while a < 5 do <<write a; a := a + 1>>;
nothing is printed
</TT></PRE><P>