ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scot P. Floess" <flo...@mindspring.com>
Subject Re: numerical comparison of properties.
Date Mon, 18 Sep 2006 18:24:58 GMT
You -could- use the ant contrib <math> task and subtract the 
numbers...if the value starts with a "-" its less, "0" equal else greater...

something like:

<match result = "COMPARE" operation = "-" operand1 = "${VAR1}" operand2 
= "${VAR2}/>



lists@bitfaeule.net wrote:
> Hello,
>
> I would like to have a target  compare two properties and set a third property with the
value of the greater of the two. 
>
> I have looked in at ant contrib's tasks but haven't found it. The problem seems to trivial
to write my own task.
>
> thanks for help.
>
> Jacques
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>   

-- 
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate  http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message