You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by John McNally <jm...@collab.net> on 2001/02/28 23:56:40 UTC

concatenation eccentricity

I had something similar to:

#set ( $a = "$b${c}foo.java" )
#set ( $d = "$b${c}.java" )

if $b=boy and $c=cat
this gives $a=boycatfoo.java and $d=boy${c}.java

 changing to 

#set ( $d = "${b}${c}.java" ) 
it works => $d = boycat.java

I have no problem with requiring the braces but not sure why it works
for $a but not $d.

John McNally

Re: concatenation eccentricity

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
John McNally wrote:
> 
> I had something similar to:
> 
> #set ( $a = "$b${c}foo.java" )
> #set ( $d = "$b${c}.java" )
> 
> if $b=boy and $c=cat
> this gives $a=boycatfoo.java and $d=boy${c}.java
> 
>  changing to
> 
> #set ( $d = "${b}${c}.java" )
> it works => $d = boycat.java
> 
> I have no problem with requiring the braces but not sure why it works
> for $a but not $d.
> 
> John McNally

Should be fixed now, so give it a whirl.  Thanks again.

geir

-- 
Geir Magnusson Jr.                               geirm@optonline.com
Developing for the web?  See http://jakarta.apache.org/velocity/

Re: concatenation eccentricity

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
John McNally wrote:
> 
> I had something similar to:
> 
> #set ( $a = "$b${c}foo.java" )
> #set ( $d = "$b${c}.java" )
> 
> if $b=boy and $c=cat
> this gives $a=boycatfoo.java and $d=boy${c}.java
> 
>  changing to
> 
> #set ( $d = "${b}${c}.java" )
> it works => $d = boycat.java
> 
> I have no problem with requiring the braces but not sure why it works
> for $a but not $d.
> 
> John McNally


That's wierd, and appears to be a bug. :)  Thanks.

geir

-- 
Geir Magnusson Jr.                               geirm@optonline.com
Developing for the web?  See http://jakarta.apache.org/velocity/