From c513cca898a61058886426192538446322a4032a Mon Sep 17 00:00:00 2001 From: peterkittreilly Date: Tue, 10 Oct 2006 21:11:39 +0000 Subject: add begin/step/end attributes to git-svn-id: file:///home/sven/projects/JOGL/temp/ant-contrib/svn/ant-contrib-code/trunk/ant-contrib@52 32d7a393-a5a9-423c-abd3-5d954feb1f2f --- docs/manual/tasks/for.html | 52 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) (limited to 'docs/manual/tasks/for.html') 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 @@ The list of values to process, with the delimiter character, indicated by the "delimiter" attribute, separating each value. - Yes, unless a nested path - has been specified. + Yes, one of these needs to + be set, unless a nested path + has been specified. + + + end + + 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. + param @@ -98,6 +107,22 @@ No. Defaults to false. + + begin + + Sets the starting index value. This in only used + if the "end" attribute is set. + + No. Defaults to "1". + + + step + + Sets the index increment step. + This in only used if the "end" attribute is set. + + No. Defaults to "1". +

Parameters specified as nested elements

@@ -190,8 +215,29 @@ </ac:sequential> </ac:for> + +

+ The following example loops from one to ten. +

+
+    <ac:for param="i" end="10">
+      <sequential>
+        <echo>i is @{i}</echo>
+      </sequential>
+    </ac:for>
+    
+

+ The following example counts down from 10 to 0 in steps of -2. +

+
+    <ac:for param="i" begin="10" step="-2" end="0">
+      <sequential>
+        <echo>i is @{i}</echo>
+      </sequential>
+    </ac:for>
+    

-

Copyright © 2003-2005 Ant-Contrib Project. All +

Copyright © 2003-2006 Ant-Contrib Project. All rights Reserved.

-- cgit v1.2.3