The continue statement starts the next iteration of a foreach statement or while statement. When ASL invokes the continue statement, the remaining statements in the foreach or while loop are skipped. The continue statement is not valid outside of a loop.

In the following example, an if statement checks whether values in a table are positive. For any number less than or equal to 0, the continue statement advances the foreach loop.

ASL Script (continue_do.asl):
x = table();
START {
 LOAD
}
LOAD {
 y:word z:integer eol
}
do {
 x[y] = z;
}
EOF 
do {
 foreach w (x)
  //skip if not positive
  {if (x[w]<=0)
   {continue;
   }
  print(w." ".x[w]);
  }
}
Input (continue_do.txt):
elephant 0
goat -1
worm 100
chicken 7
dog 2
cat 0
moose 9
Output:
$ sm_adapter --file=continue_do.txt continue_do.asl
dog 2
moose 9
chicken 7
worm 100
$