continue
原文
continueキーワードはwhile、for、doループの途中で、continue以降の処理をスキップします。
ループの条件式を確認し、それ以降の繰り返しを続行します。
利用例
code:continueSample.ino
for (x = 0; x < 255; x ++) {
if (x > 40 && x < 120) { // create jump in values
continue; // skips the next two lines and goes to the
// beginning of the loop, with the next value of x
}
digitalWrite(PWMpin, x);
delay(50);
}
関連項目
for
while
do
break
continue
License and Attribution: Portions of this page were adapted from the Arduino Reference Documentation, which is released under a Creative Commons Attribution-ShareAlike 3.0 License.
このドキュメントはleafLabs, LLC.が執筆し、たま吉が翻訳・一部加筆修正したものです。
Arduino STM32 リファレンス 日本語版 に戻る