[Zope-dev] DTML Multiplication

Stuart 'Zen' Bishop zen@cs.rmit.edu.au
Thu, 2 Dec 1999 18:11:12 +1100 (EST)


On Thu, 2 Dec 1999, John Fohrman wrote:

> Thanks, Jim, but this doesn't work; I still get the same error -- any other
> suggestions?

> > <dtml-let new_val="qty*value">
> > <dtml-call "REQUEST.set('totalCost',new_val)">
> > </dtml-let>


Try: 

<dtml-let new_val="_.int(qty)*_.float(value)">
<dtml-call "REQUEST.set('totalCost',new_val)">
</dtml-let>

qty and value might be strings (or something) rather than numeric types.

-- 
 ___
   //     Zen (alias Stuart Bishop)     Work: zen@cs.rmit.edu.au
  // E N  Senior Systems Alchemist      Play: zen@shangri-la.dropbear.id.au
 //__     Computer Science, RMIT 	 WWW: http://www.cs.rmit.edu.au/~zen