Caché MultiValue Basic Reference
EXIT
[Back] [Next]
   
Server:docs2
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

Exits a LOOP...REPEAT or FOR...NEXT statement.
Synopsis
EXIT
Arguments
The EXIT statement takes no arguments.
Description
The EXIT statement can only be used within a LOOP...REPEAT or FOR...NEXT control structure to provide an alternate way to exit the loop. EXIT transfers control to the statement immediately following the end of the loop structure (the NEXT or REPEAT keyword).
Any number of EXIT statements may be placed anywhere in the block of code statements. EXIT is commonly used with the evaluation of some condition (such as an IF...THEN statement).
When used within nested loop statements,EXIT only exits the loop in which it occurs; EXIT transfers control to the loop that is nested one level above the exited loop.
The GOTO statement can also be used to exit from a loop control structure. The CONTINUE statement exits from the current iteration of a loop; the EXIT statement exits from the loop.
Emulation
In jBASE emulation mode, EXIT has both an argumentless and an argumented form.
See Also