Continue语句
continue 关键字会跳过for, forloop, foreach, foreachkey,while 或 do-while 循环中当前迭代的其余指令。会在循环条件求值及下一个迭代开始之初继续执行代码。
Syntax
continue;
示例
for(int i = 0; i < 5; i++) {
if(i == 1 || i == 3) continue;
log.message("%d ",i);
}
// 示例会输出下列结果: 0 2 4
最新更新: 2017-10-20
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)