“Continue”的版本間的差異
來自ALSROBOT WiKi
(以“continue語句跳過一個循環(huán)的當(dāng)前迭代的余下部分。(do,for,或while)。通過檢查循環(huán)測試條件它將繼續(xù)進(jìn)行隨后的迭代。 示...”為內(nèi)容創(chuàng)建頁面) |
2014年9月12日 (五) 13:22的最后版本
continue語句跳過一個循環(huán)的當(dāng)前迭代的余下部分。(do,for,或while)。通過檢查循環(huán)測試條件它將繼續(xù)進(jìn)行隨后的迭代。
示例:
for (x = 0; x < 255; x ++) { if (x > 40 && x < 120){ // create jump in values continue; } digitalWrite(PWMpin, x); delay(50); }