velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shinobu Kawai <shinobu.ka...@gmail.com>
Subject Re: compare float?
Date Mon, 06 Jun 2005 18:16:49 GMT
Hi Nick,

> 1) We have been using velocity 1.3.1-rc2 and have a requirement where we
> need to compare floats in velocity templates.  So we need to do
> something like
> 
>  #set($afloat=$floatObject.gpa)
> 
>  #set($gpaWarning = 2.7)
> 
>  #if ($afloat <= $gpaWarning)
> 
> academic probation letter....
> 
> 
> 
> Can this be done in 1.5-dev?  If we need to put the gpaWarning value
> into context, we can do that if it cannot be declared in the template.
> Is that needed?

Yes it can, so no it's not.  As an alternative, you can create a
$floatObject.isGpaUnderWarningValue() method.  :)

> 2) We have quite a bit of code that depends on 1.3.1-rc2, is 1.5-dev in
> a stable state?

The developers are trying their best to keep the code base working.  I
would trust it, but it's up to you to decide.

> 3) What is the URL to get the Velocity 1.5-dev version?

http://cvs.apache.org/snapshots/velocity/

Best regards,
-- Shinobu

--
Shinobu Kawai <shinobu.kawai@gmail.com>

---------------------------------------------------------------------
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