ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
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.