A break operator terminates the execution of the nearest nested outward
switch, while, or for operator. The control is given to the operator that follows the terminated
one. One of the purposes of this operator is to finish the looping execution
when a certain value is assigned to a variable.
break処理は最も近くにある外側の switch、while または for の処理から抜けます。コントロールは、終了したそれに続く処理に与えられます。この処理の目的のひとつは、変数が特定の値になった場合にループの実行を終了することです。
Examples:
例:
// searching for the first zero element
最初のゼロ要素を探す
for(i=0;i<array_size;i++)
if((array[i]==0)
break;
|