aboutsummaryrefslogtreecommitdiffstats
path: root/source/arduino/continue.rst
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@mit.edu>2010-10-25 21:15:28 -0400
committerMarti Bolivar <mbolivar@mit.edu>2010-11-17 12:44:28 -0500
commit2d429e75ce69e77f8c95490ac03881ec9aa0354a (patch)
treea3b810a6c75625b07a4b976e5d1e319c60e19a6b /source/arduino/continue.rst
parent30ac55d80c18e93f9c39a6dd850c10f9e7fd92ac (diff)
downloadlibrambutan-2d429e75ce69e77f8c95490ac03881ec9aa0354a.tar.gz
librambutan-2d429e75ce69e77f8c95490ac03881ec9aa0354a.zip
arduino language reference nearing completion, properly CC-BY-SA 3.0 attributed
Diffstat (limited to 'source/arduino/continue.rst')
-rw-r--r--source/arduino/continue.rst16
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);
}
-