![]() | Programming Guide | ![]() |
Skips to the next iteration of a loop
next
The
nextcommand is valid in any for or while loop.nextterminates the current iteration of the loop and starts the next iteration. When anextstatement executes, JPL skips all subsequent statements until the end of the loop. If the loop is controlled by aforstatement, JPL increments the loop's step value. It then tests the loop condition; if the condition evaluates to true, JPL executes thewhileorforstatement block.nextresembles thecontinuestatement 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
![]()
![]()
![]()
![]()