diff options
author | peterkittreilly <[email protected]> | 2006-10-10 21:11:39 +0000 |
---|---|---|
committer | peterkittreilly <[email protected]> | 2006-10-10 21:11:39 +0000 |
commit | c513cca898a61058886426192538446322a4032a (patch) | |
tree | b3763e30006ac954e54a457ba5b59ee4650d94d5 /docs/manual/tasks/for.html | |
parent | 549e6a7ebcfd11570cecb48b81557446ca5a18ae (diff) |
add begin/step/end attributes to <for>
git-svn-id: file:///home/sven/projects/JOGL/temp/ant-contrib/svn/ant-contrib-code/trunk/ant-contrib@52 32d7a393-a5a9-423c-abd3-5d954feb1f2f
Diffstat (limited to 'docs/manual/tasks/for.html')
-rw-r--r-- | docs/manual/tasks/for.html | 52 |
1 files changed, 49 insertions, 3 deletions
diff --git a/docs/manual/tasks/for.html b/docs/manual/tasks/for.html index ecf23fe..b76789c 100644 --- a/docs/manual/tasks/for.html +++ b/docs/manual/tasks/for.html @@ -41,8 +41,17 @@ <td valign="top">The list of values to process, with the delimiter character, indicated by the "delimiter" attribute, separating each value.</td> - <td align="center" valign="top">Yes, unless a nested path - has been specified.</td> + <td align="center" valign="top" rowspan="2">Yes, one of these needs to + be set, unless a nested path + has been specified.</td> + </tr> + <tr> + <td valign="top">end</td> + <td valign="top"> + Sets the ending index value. If this attribute is + set, the <for> task will loop from "start" (default 1) + to "end", using "step" (default 1) increments. + </td> </tr> <tr> <td valign="top">param</td> @@ -98,6 +107,22 @@ </td> <td align="center" valign="top">No. Defaults to false.</td> </tr> + <tr> + <td valign="top">begin</td> + <td valign="top"> + Sets the starting index value. This in only used + if the "end" attribute is set. + </td> + <td align="center" valign="top">No. Defaults to "1".</td> + </tr> + <tr> + <td valign="top">step</td> + <td valign="top"> + Sets the index increment step. + This in only used if the "end" attribute is set. + </td> + <td align="center" valign="top">No. Defaults to "1".</td> + </tr> </table> <h2>Parameters specified as nested elements</h2> @@ -190,8 +215,29 @@ </ac:sequential> </ac:for> </pre> + + <p> + The following example loops from one to ten. + </p> + <pre> + <ac:for param="i" end="10"> + <sequential> + <echo>i is @{i}</echo> + </sequential> + </ac:for> + </pre> + <p> + The following example counts down from 10 to 0 in steps of -2. + </p> + <pre> + <ac:for param="i" begin="10" step="-2" end="0"> + <sequential> + <echo>i is @{i}</echo> + </sequential> + </ac:for> + </pre> <hr> - <p align="center">Copyright © 2003-2005 Ant-Contrib Project. All + <p align="center">Copyright © 2003-2006 Ant-Contrib Project. All rights Reserved.</p> </body> |