diff options
Diffstat (limited to 'source/arduino/continue.rst')
-rw-r--r-- | source/arduino/continue.rst | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source/arduino/continue.rst b/source/arduino/continue.rst index 66c7e60..42d7825 100644 --- a/source/arduino/continue.rst +++ b/source/arduino/continue.rst @@ -1,13 +1,15 @@ +.. highlight:: cpp + .. _arduino-continue: 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. - +The ``continue`` keyword skips the rest of the current iteration of a +:ref:`while <arduino-while>`\ , :ref:`for <arduino-for>`\ , or +:ref:`do/while <arduino-dowhile>` loop. It continues by checking the +conditional expression of the loop, and proceeding with any subsequent +iterations. Example @@ -19,11 +21,11 @@ Example for (x = 0; x < 255; x ++) { if (x > 40 && x < 120){ // create jump in values - continue; + 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); } - |