DO WHILE
Contents
Purpose
Repeat a block of commands while a specified condition is true
Syntax
DO WHILE <condition>
[EXIT]
[LOOP]
ENDDO
See Also
DO, DO CASE, EXIT, FOR, FOREACH, IF, LOOP, SCAN
Description
The DO WHILE command repeats the commands between the DO WHILE and the ENDDO statement, until the specified <condition> becomes .F. The maximum number of nested DO WHILE loops allowed is 16.
If the specified <condition> result is .T., then all commands within the DO WHILE loop will be executed. If the specified condition returns an .F., Recital will skip down to the first statement following the ENDDO to continue execution.
Note: Use of redefined macros in the body of the loop is not supported.
EXIT
If an EXIT statement is encountered then the DO WHILE loop is exited.
LOOP
If a LOOP statement is encountered, then control returns to the head of the DO WHILE loop.
ENDDO
The ENDDO statement terminates the DO WHILE loop. Commands within the DO WHILE must be properly nested.
Example
use patrons index events, names seek "OPERA" do while event = "OPERA" display name, event, seats*price off skip enddo
Products
Recital Server, Recital