On Thu, 23 Oct 2003, Jose Alberto Fernandez
<[EMAIL PROTECTED]> wrote:
>> From: Stefan Bodewig [mailto:[EMAIL PROTECTED] 

>> If you have several nested <ant>s, you'd have to check each level
>> for a <local> that was in place shadowing your global value.
> 
> But this is no more or less shadowing than me making one of the 
> <ant> calls passing a <param> with the value of the local.

Except that <param> is explicit and doesn't happen by accident.

> I think it is a mistake that <local> if local is not visible across
> <ant>, if that were the case then it should not be visible across
> <macrodef> either.

You have a compelling example here

>  <macrodef name="m">
>   <echo>${p}</echo>
>   <if>
>     <equals arg1="${p}" arg2="my local p"/>
>     <then>
>       <antcall target="tm"/>
>     </then>
>   </if>
>  </macrodef>
> 
>  <target name="x">
>    <local name="p" value="my local p">
>      <m/>
>    </local>
>  </target>
> 
>  <target name="tm">
>   <echo>${p}</echo>
>  </target>
> 
>  <property name="p" value="my global p"/>
> 
>  [echo] my local p
>  [echo] my global p

and I currently don't have an answer for this.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to