Syntax
BD>...
BD>...Body of commands
BD>...
where E is any valid equation.
The WHILE: ...WEND: construction is used to provide a loop
surrounding a body of commands which will be processed as long as
the rounded value of
the equation E remains TRUE.
An equation is defined to be TRUE if the rounded value of
the equation is equal to unity, and FALSE otherwise. If no equation is given, or if a mistake is made in
determining the equation, then [B/D] assumes that a valid equation with value FALSE has
been supplied, so that the commands in the loop will not be processed.
Both the initiating WHILE: and the terminating WEND: command must
be given on a separate line, and you should be careful not to confuse
separate while ...end structures where you are nesting them.
As an example, consider
the following program fragment.
This code establishes two loops during which the constants
take the values (%i=1,%j=1), (%i=1,%j=2), (%i=2,%j=1),
(%i=2,%j=2), and then terminate.