Awesome, Scot. It works well! Can't wait for the "better" solution
that you are about to create :-)
You must use 1.6.5 for this (for example, 1.6.2 did not work)
<project name="looper" default="test">
<taskdef resource="net/sf/antcontrib/antcontrib.properties"
classpath="/apache-ant-1.6.5ant1.6.2/lib/ant-contrib-1.0b1.jar" />
<macrodef name = "jp-for">
<attribute name = "param" description = "The name of the param
containing the current value of the loop"/>
<attribute name = "lower" default = "1" description = "The
lower bounds of the loop"/>
<attribute name = "upper" description = "The upper bounds of the
loop"/>
<attribute name = "step" default = "1" description = "The
upper bounds of the loop"/>
<element name = "loop" implicit = "true" description = "The
enclosing block - just like ant contrib's for/sequential"/>
<sequential>
<var name = "@{param}" value = "@{lower}"/>
<if><not><equals arg1 = "[EMAIL PROTECTED]" arg2 = "@{upper}"/></not>
<then>
<loop/>
<math result = "@{param}" datatype = "int"
operation = "+" operand1 = "[EMAIL PROTECTED]" operand2 = "@{step}"/>
<jp-for param = "@{param}" lower = "[EMAIL PROTECTED]"
upper = "@{upper}" step = "@{step}">
<loop/>
</jp-for>
</then>
</if>
</sequential>
</macrodef>
<target name="test">
<jp-for param="outer" lower="0" upper="5">
<jp-for param="inner" lower="0" upper="6">
<echo> parameters are now: (${outer},${inner})</echo>
</jp-for>
</jp-for>
</target>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]