velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kishore Senji <kse...@gmail.com>
Subject Re: operations on numbers from getters
Date Tue, 10 Aug 2004 20:32:09 GMT
On Tue, 10 Aug 2004 11:08:17 -0700, Kevin Ward <kevin@kevinandliz.com> wrote:
> 
> In the context of a page I have placed an object (granule) which has a
> method getFileSizeMB() that returns a Double. In that page I am trying the
> following:
> 
> #set ( $fileSize = $granule.getFileSizeMB() * 1000000 )
> 
> and I get an error saying that the right side is null. I can do
> 
> #set ( $fileSize = $granule.getFileSizeMB() )
> 
> and that evaluates correctly, so obviously the problem lies in the
> operation. In the Velocity documentation it mentions that integers (little
> 'i') are permissible for math functions. Does this mean that the operation
> is failing because it is a Double?

That's right. Currently only Integer types are supported.

Thanks,
Kishore Senji.


> 
> Thanks,
> 
> Kevin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message