9.7.2  How does a single while-loop work?

The while-loop works like this:

  1. If the condition between the parentheses evaluates to false, jump to the command after the #end statement. If the condition evaluates to true, just continue normally.
  2. At the #end statement jump to the #while statement and start again.

That is:

Note that nowhere there's any mention about any index variable or anything else that could be used to automatically end the loop or whatever. As said, it's just a "dumb" loop that continues forever if necessary, only testing the statement between the parentheses (but it's not interested in what it is, only in its evaluated value).

Although one could easily think that this kind of "dumb" loop is bad and it should be more "intelligent" and better, the fact is that this kind of "dumb" loop is actually a lot more flexible and versatile. It allows you to make things not possible or very difficult to do with an "intelligent" for-loop with automatic index variables.