用户工具

站点工具


en:reference:language:continue

差别

这里会显示出您选择的修订版和当前版本之间的差别。


前一修订版
en:reference:language:continue [2023/06/07 04:23] (当前版本) – 外部编辑 127.0.0.1
行 1: 行 1:
 +====== continue ======
 +
 +
 +The continue statement skips the rest of the current iteration of a loop (do, for, or while). It continues by checking the conditional expression of the loop, and proceeding with any subsequent iterations.
 +
 +
 +===== Example =====
 +
 +<code cpp>
 +for (x = 0; x < 255; x ++)
 +{
 +    if (x > 40 && x < 120){      // create jump in values
 +        continue;
 +    }
 +
 +    digitalWrite(PWMpin, x);
 +    delay(50);
 +}
 +</code>
 +