Difference between revisions of "EXIT"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
− | Force exit from a DO WHILE loop | + | Force exit from a DO WHILE, SCAN or FOR...ENDFOR | FOR...NEXT loop |
− | + | ||
==Syntax== | ==Syntax== | ||
− | EXIT | + | EXIT [IN <workarea>|<alias>] |
− | + | ||
==See Also== | ==See Also== | ||
[[DO WHILE]], [[FOR]], [[LOOP]], [[SCAN]] | [[DO WHILE]], [[FOR]], [[LOOP]], [[SCAN]] | ||
− | |||
==Description== | ==Description== | ||
− | The EXIT command causes control to drop out of a DO WHILE or FOR...NEXT loop. | + | 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== | ==Example== | ||
Line 28: | Line 27: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
− | [[Category: | + | [[Category:NoSQL Commands]] |
− | + |
Latest revision as of 08:35, 4 January 2021
Purpose
Force exit from a DO WHILE, SCAN or FOR...ENDFOR | FOR...NEXT loop
Syntax
EXIT [IN <workarea>|<alias>]
See Also
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