aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src/for.txt
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2005-09-20 23:31:55 +1000
committerGravatar axel <axel@liljencrantz.se>2005-09-20 23:31:55 +1000
commit7ddecde54372c25fcf526e2d24807c5dac9800aa (patch)
tree1bff6e0ccd096836adb74529d53a6debcf45375b /doc_src/for.txt
parent149594f974350bb364a76c73b91b1d5ffddaa1fa (diff)
Add subdirectories
darcs-hash:20050920133155-ac50b-9a14c6c664dd03afbe8e15e7c7998fcfb5c3c750.gz
Diffstat (limited to 'doc_src/for.txt')
-rw-r--r--doc_src/for.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc_src/for.txt b/doc_src/for.txt
new file mode 100644
index 00000000..83fee0dc
--- /dev/null
+++ b/doc_src/for.txt
@@ -0,0 +1,23 @@
+
+\section for for - perform a set of commands multiple times.
+
+\subsection for-synopsis Synopsis
+<tt>for VARNAME in [VALUES...]; [COMMANDS...]; end</tt>
+
+\subsection for-description Description
+<tt>for</tt> is a loop construct. It will perform the commands specified
+by <tt>COMMANDS</tt> multiple times. Each time the environment variable
+specified by <tt>VARNAME</tt> is assigned a new value from <tt>VALUES</tt>.
+
+\subsection for-example Example
+
+The command
+
+<tt>for i in foo bar baz; echo $i; end</tt>
+
+would output:
+
+<pre>foo
+bar
+baz</pre>
+