Exit command added to exit loops or functions > exit(); // exit current loop/function > exit(name); // exit nested loops/functions up to and including loop/function with name * Examples: > 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.
|
|