diff options
author | Marti Bolivar <mbolivar@mit.edu> | 2010-12-03 20:18:00 -0500 |
---|---|---|
committer | Marti Bolivar <mbolivar@mit.edu> | 2010-12-03 20:18:00 -0500 |
commit | 5ceac644e90c929e77f05d357d1d35d45e673fac (patch) | |
tree | 18c76f6117942fa46391fbbd8bd24e2c759c4895 /docs/source/lang/break.rst | |
parent | e5b1e44a8ae8c593456f4b4734f05c9065f6f07b (diff) | |
download | librambutan-5ceac644e90c929e77f05d357d1d35d45e673fac.tar.gz librambutan-5ceac644e90c929e77f05d357d1d35d45e673fac.zip |
cleaning up previous commits.
note that addition of new files under docs/source/lang/api and
docs/source/lang/cpp which were just copies of files in
docs/source/lang/ imply that change history is lost to git.
Diffstat (limited to 'docs/source/lang/break.rst')
-rw-r--r-- | docs/source/lang/break.rst | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/docs/source/lang/break.rst b/docs/source/lang/break.rst deleted file mode 100644 index ce8ac17..0000000 --- a/docs/source/lang/break.rst +++ /dev/null @@ -1,35 +0,0 @@ -.. highlight:: cpp - -.. _lang-break: - -``break`` -========= - -``break`` is used to exit from a :ref:`while <lang-while>`\ , -:ref:`for <lang-for>`\ , or :ref:`do/while <lang-dowhile>` loop, -bypassing the normal loop condition. It is also used to exit from a -:ref:`switch <lang-switchcase>` statement. - - -Example -------- - -:: - - for (x = 0; x < 255; x ++) - { - digitalWrite(PWMpin, x); - sens = analogRead(sensorPin); - if (sens > threshold){ // bail out on sensor detect - x = 0; - // this line of code means that we'll immediately exit - // from the "for" loop: - break; - } - delay(50); - } - - - - -.. include:: cc-attribution.txt |