Command EXIT
 
Description Command EXIT() to exit functions or loops.
 
Syntax/Parameters EXIT(Name)

> EXIT();
   Exit current loop/function.

> EXIT(name);
   Exit nested loops/functions up to and including loop/function with name.
 
Example > loop(lp1,FOREVER){ calc(x,y,z,"+"); if(x=5?[exit(lp1);]); }       // exit loop when x=5
> loop(lp2,FOREVER){ calc(x,y,z,"+"); if(x=5?[exit(lp2);]); }       // exit loop when x=5 (as above)
> FUNC(fn1) { if(x=5?[EXIT(fn1);]); ...... }                                // exits function when x=5 without running rest of code
> FUNC(fn2) { LOOP(lp3,100){ LOAD(RS2,"*"); if(quit=1?[EXIT(fn2);;]);             
   // sends 100 *'s through RS2 unless quit is set to 1, then loop and the function are exited (A screen refresh occurs before the exit)

Note, if the name provided in the EXIT(name); command does not exist in the current function/loop nesting, then all loops
and functions are exited up to the top level. It is not possible to exit the page loop in this way.