Bah!  Forget I said anything :)

<if test="${bool::parse(long::parse(x) != 0)}" >
        <fail message="Aborted." />
</if>

Stephen Tunney, MCAD.NET

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Stephen
Tunney
Sent: January 9, 2006 12:19 PM
To: [email protected]
Subject: [NAnt-users] Integer value comparisons

Hello All,

Having trouble with the basics again :).

Was wondering how someone would go about expressing the following

Psuedo Code:
{
        Variable x := 500  //Value can be anything, returned from an
exec call

        If x != 100 then fail
}

I've tried the following and if fails

<property name="x" value="500" />

<if test="${long::parse(x)} != 0">
        <fail message="Aborting." />
</if>

And it complains that
'603 != 0' is not a valid value for attribute 'test' of <if ... />
Cannot resolve '603 != 0' to boolean value.
String was not recognized as a valid Boolean.

Little help? :(

Stephen Tunney, MCAD.NET


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op,ick
_______________________________________________
NAnt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users


This Message Scanned for Viruses by McAfee WebShield .



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
NAnt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to