Overview
The break
and continue
statements control iteration over data during execution of the scan
statement.
The syntax is:
(break | continue) [label].
These statements take an optional label as an argument to indicate to which loop the statement applies. When the label is omitted, the statement always applies to the innermost loop. For example:
loop1; sc [1,2,3,4] -- (->i) {
sc [1,2,3,4] -- (->j) {
if j > i then
continue loop1. // restart the next iteration of the outer loop
end
if j == 4 then
break. // terminate the inner loop
end
}
}