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.