continue
continue 可以用來跳過迴圈(do、for、while)中剩下的片段,回到迴圈的條件判斷式,來決定繼續進行或離開。
範例
for (x = 0; x < 255; x ++)
{
f (x > 40 && x < 120){ // 跳過這個區段的數值
continue;
}
digitalWrite(PWMpin, x);
delay(50);
}
本頁由熱血青年 LBU 譯自英文版。
The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.
