Title: RE: [nant-dev] Recursively expanded properties

Shaw,
What's the benefits? I can't see from here.

--
hammett


-----Original Message-----
From: Shaw, Gerry [mailto:[EMAIL PROTECTED]]
Sent: segunda-feira, 26 de agosto de 2002 15:40
To: 'Ian MacLean'
Cc: '[EMAIL PROTECTED]'
Subject: RE: [nant-dev] Recursively expanded properties


> My first question is 'How do you know that value="b" is supposed to be
expanded and not just the literal "b" ? '

Because it gets expanded into a nested ${ }.


> and how does nant know that
abc = "123" means a=1, b=2 and c=3 ? Initially it seems like this would
introduce some user confusion. Maybe I'm missing somthing though.

Because property abc expands to 123 (not a=1, b=2, c=3).  I think my example
was a bit confusing.

For clarity here it is again.

If you went:

<property name="alpha"   value="a"/>
<property name="bravo"   value="b"/>
<property name="charlie" value="c"/>
<property name="abc"     value="123/>

<echo message="${alpha}"/>

you would get (as you would expect):

[echo] a

If you went:

<echo message="${${alpha}bc}"/>


You would get (something you might expect - I hope):

[echo] 123

What has happened is that ${alpha} got expanded to 'a' and then used to form
the next property name 'abc' for the nested expansion to give '123'.


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to