RPL equivalents to BREAK, CYCLE, EXIT, etc.?
|
06-07-2014, 06:47 AM
Post: #6
|
|||
|
|||
RE: RPL equivalents to BREAK, CYCLE, EXIT, etc.?
(05-22-2014 09:27 AM)HP67 Wrote: Are there User RPL equivalents to break out of loops or start the next iteration such as can sometimes be found in programming languages?Error traps are a way for loops where you can't access the index easily, but you can exit FOR loops without generating an error condition. Just set the index to the end value, and you're done;-) Consider the following loop, which will run 100 times: Code: << 1 100 To break out of such a loop, you simply have to set the exit condition to TRUE. The following code will exit the loop after 50 times: Code: << 1 100 The principle is the same for DO..UNTIL and WHILE..REPEAT loops, of course. -- Ray |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)