A continue operator gives control to the beginning of the nearest outward
cycle while or for operator, the next iteration being called. The purpose of this operator
is opposite to that of break operator.
continue処理は、最も近くにある外側の反復 while か for の処理の始まりにコントロールを与えて、次の繰り返しを呼び出します。この処理の目的は、break処理の反対です。
Examples:
例:
// summary of nonzero elements of array
配列のゼロ以外の要素の合計
int func(int array[])
{
int array_size=ArraySize(array);
int sum=0;
for(int i=0;i<array_size; i++)
{
if(a[i]==0) continue;
sum+=a[i];
}
return(sum);
}
|