From 5ceac644e90c929e77f05d357d1d35d45e673fac Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Fri, 3 Dec 2010 20:18:00 -0500 Subject: 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. --- docs/source/lang/break.rst | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 docs/source/lang/break.rst (limited to 'docs/source/lang/break.rst') 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 `\ , -:ref:`for `\ , or :ref:`do/while ` loop, -bypassing the normal loop condition. It is also used to exit from a -:ref:`switch ` 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 -- cgit v1.2.3