aboutsummaryrefslogtreecommitdiffstats
path: root/docs/source/lang/for.rst
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@mit.edu>2010-11-29 01:49:26 -0500
committerMarti Bolivar <mbolivar@mit.edu>2010-11-29 01:49:26 -0500
commit078edc158da7906ba72e7e6528e1a811e07270e7 (patch)
tree1bc7b2e8137fb5ebfc7b59d59294d7adb9e95468 /docs/source/lang/for.rst
parent5e587be27a7c3bd854b686952a5c9637a2432ff0 (diff)
downloadlibrambutan-078edc158da7906ba72e7e6528e1a811e07270e7.tar.gz
librambutan-078edc158da7906ba72e7e6528e1a811e07270e7.zip
Finished converting the Arduino docs
Diffstat (limited to 'docs/source/lang/for.rst')
-rw-r--r--docs/source/lang/for.rst16
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/source/lang/for.rst b/docs/source/lang/for.rst
index 6b00d7a..71c5aca 100644
--- a/docs/source/lang/for.rst
+++ b/docs/source/lang/for.rst
@@ -2,14 +2,8 @@
.. _lang-for:
-for Loops
-=========
-
-.. contents:: Contents
- :local:
-
-Description
------------
+``for``
+=======
A ``for`` loop is used to repeat a block of statements enclosed in
curly braces. ``for`` loops are useful for performing repetitive
@@ -19,6 +13,12 @@ operations, and are often used in combination with :ref:`arrays
*header*, which sets up the for loop, and then a *body*, which is made
up of lines of code enclosed in curly braces.
+.. contents:: Contents
+ :local:
+
+Syntax
+------
+
There are three parts to the ``for`` loop header: an *initialization*
expression, *loop condition* expression, and a *post-loop*
expression. The general syntax looks like this::