Programming Guide


Skips to the next iteration of a loop




The next command is valid in any for or while loop. next terminates the current iteration of the loop and starts the next iteration. When a next statement executes, JPL skips all subsequent statements until the end of the loop. If the loop is controlled by a for statement, JPL increments the loop's step value. It then tests the loop condition; if the condition evaluates to true, JPL executes the while or for statement block. next resembles the continue statement in C.


// Process all the engineers in a list of people.
vars k
for k = 1 while job[k] != "" step 1
if job[k] != "engineer"
//process mailing label for engineers...

See Also

break, for, while