logo       

Setting Variables: msg#00196

jakarta.velocity.user

Subject: Setting Variables

Have a interesting problem:

If I do something like :

#set( $foo = $bar / 52 )
$foo

where $bar is some Float set in the context (say 52), then I get
$foo - ie it isn't replaced.

However, if I do this:

#set( $foo = 0 )
#set( $foo = $bar /52 )
$foo

Then the result is:
1

Which is correct. Question is why do I need to set $foo to zero before doing
the second set for it to work?

Regards,

Peter


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise