Martin,

Either I don't understand your reply, or I didn't make myself clear. Let me give an 
example:

My NAnt script takes an optional boolean command line parameter named "simulator" 
which defaults to false.  In the script, I check property::exists('simulator').  If it 
is false, meaning the user didn't specify the parameter or specified it as false, I 
explicitly set the simulator property to "false".  If the simulator property DOES 
exist, I validate that is it either "true" or "false".  In this way, I cover the cases 
where

* there is no -D:simulator=x parameter on the command line (which I default to false),

* there is -D:simulator=true parameter,

* there is -D:simulator=false parameter, or

* there is -D:simulator=xxx (which generates a <fail>).

The one things I don't cover is a command line line containing 

     -D:simulator

with no equal sign after it, or

     -D:simulator=

with no value after the equal sign.  Inside the script,  and equal-less -D parameter 
tests as "does not exist."  The problem here, of course, is that many programs accept 
the mere mention of a boolean parameter as being the same as set to true.  So, some 
user have gotten used to simply listing boolean parameters under the assumption that 
mention makes them true.

If a -D command line parameter is malformed (e.g., no equal sign or no value after the 
equal sign), I would like to be able to detect it and report it to the user.  On the 
other hand, if such a -D command is actually illegal as far as NAnt is concerned, I 
would like for NAnt to flagged the error itself.

By the way, in 0.85, <available> is deprecated.

Merrill




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to