EXIT

From Lianjapedia
Jump to: navigation, search

Purpose

Force exit from a DO WHILE, SCAN or FOR...ENDFOR | FOR...NEXT loop

Syntax

EXIT [IN <workarea>|<alias>]

See Also

DO WHILE, FOR, LOOP, SCAN

Description

The EXIT command causes control to drop out of a DO WHILE, SCAN or FOR...ENDFOR | FOR...NEXT loop.

IN <workarea>|<alias>

If the workarea number, letter or alias name is specified, the EXIT is carried out in that workarea. From v6.0.

Example

use patrons index events
seek "BALLET"
do while not eof()
    if event<>"BALLET"
        exit
    endif
    display name, event, seats, seats * price off
    skip
enddo