Do Loop

From BR Wiki
Revision as of 14:41, 9 February 2012 by Mikhail.zheleznov (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
DO [WHILE condition]
   [loop body]
LOOP [WHILE|UNTIL condition]

A DO LOOP allows you to specify that an application should repeat an action while some condition remains true and/or until another condition is true.

The loop body consists of zero or more statements.

Eventually, the condition should become false. At this point, the repetition terminates, and the first statement after the DO LOOP executes.

Note that if your DO LOOP condition is never false, your DO LOOP may repeat infinitely. In this case, the program stays stuck in RUN mode.