next up previous
Next: The repeat-until Loop Up: The pseudocode Environment Previous: The for Loop

The while Loop

The while loop takes the following form:

\WHILE <condition> \DO <stmt>

For example,

\WHILE some condition holds \DO 
  some processing

produces



\begin{pseudocode}[display]{}{}
\WHILE \mbox{some condition holds} \DO
\mbox{some processing }
\end{pseudocode}



Donald L. Kreher
2000-02-18