> On Thursday 21 March 2002 13:04 pm, Adam Murdoch wrote:
> > Here's how the test gets evaluated:
> >
> > property not set => false
> > property set to 'false' => false
> > property set to anything other than 'false' => true
Here's a sample:
<project name="bogus" default="main">
<property name='foo' value='false'/>
<target name="main" if='foo'>
<echo>Foo is set!</echo>
</target>
</project>
Runs:
main:
[echo] Foo is set!
On the surface this is very counterintuitive. Someone MUST read the docs
about 'if' to understand that there is not a bug here. Okay, they should read
the docs, anyway, but it's easy to miss the one sentence in the one section
which explains this.
If 'if' was called 'ifset', this would not be so confusing.
----- stephan
Generic Universal Computer Guy
[EMAIL PROTECTED] - http://www.einsurance.de
Office: +49 (89) �552 92 862 Handy: �+49 (179) 211 97 67
"I ain't gen'rally given to physicality of that nature but it saves
a lot of arguing." -- Nanny Ogg
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>