Hello, Thanks for the information!
That's exactly what I need. Regards, Paulo -----Original Message----- From: ext Ondrej Svetlik [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 14, 2005 16:07 To: Ant Users List Subject: Re: Using properties like variables Hello, try using <variable> from ant contrib. Best regards Ondrej Svetlik [EMAIL PROTECTED] wrote: > Hi everyone, > > I know that properties can't be used > as variables. However I'm trying to > implement something where I would like to have a behaviour similar to > that. > > For example, let's imagine for a second that properties aren't > immutable, and create the following macro > > <macrodef mymacro="name"> > <attribute name="arg1"/> > <attribute name="arg2" default=""/> > <sequencial> > <!-- if arg2 != "" set var=arg1/arg2 else var=arg1--> > > <!-- just use var in all required places --> > </sequencial> > </macrodef> > > My problem is that if this macro is called more that once, "path" will > always have the first value it was set to. > > I can understand the behaviour because this is how properties work. > > Is there a way of somehow having properties that are local to the > macro definitions? > > Thanks, > Paulo > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] For additional > commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]