🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
break关键字会离开它所声明的控制流最深的循环,停止进一步的迭代: > The break keyword leaves the control flow of the innermost loop (for or while) it is declared in, stopping further iterations: ~~~ while(true) { expression1; if (condition) break; expression2; } ~~~ 这里,expression1每个迭代都会被执行,但是当条件满足,expression2则不再执行。 > Here,expression1 is evaluated for each iteration,but as soon as condition holds,expression2 is not evaluated anymore. 类型工具确保它只出现在一个循环中。break关键字在Haxe并不支持用于 switch case表达式(第5.17节)。 > The typer ensures that it appears only within a loop. The break keyword in switch cases (5.17) is not supported in Haxe.