diff options
author | Marti Bolivar <mbolivar@mit.edu> | 2010-11-29 01:49:26 -0500 |
---|---|---|
committer | Marti Bolivar <mbolivar@mit.edu> | 2010-11-29 01:49:26 -0500 |
commit | ee35f641687d0d3159c15eea5ad80d71efff4f82 (patch) | |
tree | d58e470a42623a1fba3eccbab324a26316d60398 /source/lang/for.rst | |
parent | d9cbd78e29d42e70bb46641dd43ee0772c8c975f (diff) | |
download | librambutan-ee35f641687d0d3159c15eea5ad80d71efff4f82.tar.gz librambutan-ee35f641687d0d3159c15eea5ad80d71efff4f82.zip |
Finished converting the Arduino docs
Diffstat (limited to 'source/lang/for.rst')
-rw-r--r-- | source/lang/for.rst | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/lang/for.rst b/source/lang/for.rst index 6b00d7a..71c5aca 100644 --- a/source/lang/for.rst +++ b/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:: |