Troy,

Implicit conversion has not yet been removed from NAnt, we still need to come to an agreement on some stuff (this is also what's holding back the 0.85 release).

Gert

----- Original Message ----- From: "Troy Laurin" <[EMAIL PROTECTED]>
To: "Merrill Cornish" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, August 18, 2004 2:33 AM
Subject: Re: [Nant-users] Expressions With Variables?



Merrill Cornish wrote:
It all started out innocently enough with me trying to conditionalize an <echo> message depending on whether the size of a certain file was greater or less than a certain limit. Things when down hill from there. Below is a simplified NAnt script and the output it produced.

To my understanding the third message should have printed as "expr2=True" similar to how the second message printed.

Merrill
======================================================

<?xml version="1.0" ?>
<project name="Test" default="run" >
<target name="run" >
<property name="count" value="100" />
<echo message="count=${count}" />
<echo message="expr1=${50 &lt; 100}" />
<echo message="expr2=${50 &lt; count}" />
</target>
</project>
=====================================================
> [snip]
System.ArgumentException: Object must be of type Int32.

Merrill,

Implicit conversion has been removed from NAnt, and properties currently evaluate as strings... to get around this, you should change your expression to:

<echo message="expr2=${50 &lt; convert::to-int(count)}" />


Regards,

-- Troy


------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users




------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to