Answer
We are using a ``DO WHILE'' loop instead of a regular ``DO'' loop. Note that
the end of the loop is marked with ``ENDDO'' just as with a regular ``DO''
loop. The loop runs until the condition specified after the ``DO WHILE''
becomes false. (The ABS in that condition is an intrinsic function that
computes an absolute value.) In section 8.3 your text shows you how to
construct such loops by using a GOTO statement. The method we have illustrated
in the example program is easier to understand, and hence is superior. You
should use it.
Return to lesson.
Hamlet Project
hamlet@cs.utah.edu