aboutsummaryrefslogtreecommitdiffstats
path: root/source/arduino/continue.rst
diff options
context:
space:
mode:
Diffstat (limited to 'source/arduino/continue.rst')
-rw-r--r--source/arduino/continue.rst18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/arduino/continue.rst b/source/arduino/continue.rst
index 31af3a5..bda1c95 100644
--- a/source/arduino/continue.rst
+++ b/source/arduino/continue.rst
@@ -2,8 +2,9 @@
.. _arduino-continue:
-continue
-========
+==========
+ continue
+==========
The ``continue`` keyword skips the rest of the current iteration of a
:ref:`while <arduino-while>`\ , :ref:`for <arduino-for>`\ , or
@@ -13,22 +14,21 @@ iterations.
Example
--------
+=======
::
-
- for (x = 0; x < 255; x ++)
- {
- if (x > 40 && x < 120){ // create jump in values
+
+ for (x = 0; x < 255; x ++) {
+ if (x > 40 && x < 120) { // create jump in values
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);
}
-.. include:: cc-attribution.txt \ No newline at end of file
+.. include:: cc-attribution.txt