Programming Guide |
Skips to the next iteration of a loop
next
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 anext
statement executes, JPL skips all subsequent statements until the end of the loop. If the loop is controlled by afor
statement, JPL increments the loop's step value. It then tests the loop condition; if the condition evaluates to true, JPL executes thewhile
orfor
statement block.next
resembles thecontinue
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"
next
//process mailing label for engineers...
}
break, for, while