|
【目录】 【上一页】 【下一页】 【索引】
continueTerminates execution of the block of statements in a while or for loop, and continues execution of the loop with the next iteration.
语法continuecontinue label Argument
描述In contrast to the break statement, continue does not terminate the execution of the loop entirely: instead,The continue statement can now include an optional label that allows the program to terminate execution of a labeled statement and continue to the specified labeled statement. This type of continue must be in a looping statement identified by the label used by continue. 示例The following example shows a while loop that has a continue statement that executes when the value of i is 3. Thus, n takes on the values 1, 3, 7, and 12.
i = 0 If continue had a label of checkiandj, the program would continue at the top of the checkiandj statement.
checkiandj : 参看labeled
【目录】 【上一页】 【下一页】 【索引】 |