The continue command within a foreach, forvalues, or while loop breaks execution of the
current loop iteration and skips the remaining commands within the loop. Execution resumes
at the top of the loop unless the break option is specified, in which case execution
resumes with the command following the looping command.
帮助文件里已经说清楚了的help continue
自己验证一下也很容易
foreach a in 1 2 3 {
foreach b in 4 5 6 {
if `b'==5 {
continue, break
}
noi di "`a' `b'"
}
}
输出
1 4
2 4
3 4