On Wednesday, March 12, 2003, at 04:50 PM, Nathan Bubna wrote:


if people are relying on #set( $foo = 5 / 2 ) to make "$foo" == '2', then
chances are they're doing not-very-proper-designer-ish things to begin with.
even if it's legit stuff, it means that they should be savy enough to repair
their templates when upgrading to 1.5 (assuming we properly warn of this).

What would be the way to repair that? Either VTL incorporates an integer division operator, or a double-to-integer conversion operator; otherwise integer division would be lost without a chance to recover it.


Also, beware of the differences in formatting between (new Integer(2)).toString() and (new Double(2)).toString(). What would we see when we do something like:

#set($tot = $dogs.count() + $cants.count())
<p>There are $tot pets in the store</p>

(Hint: the answer is *not* "There are 15.0 pets in the store").

My intentions are not to add fuel to the flamage, but I like this less and less the more I think about it.

Mat�as.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to