[Zope] Simple calculation

Dragos Chirila d.chirila@bucarest.finsiel.ro
Mon, 24 Feb 2003 19:29:34 +0200


Hi

try this

<dtml-var expr="85 * _.float(HowOften)">

rgds



> I am obviously thick. ;-)
>
> I want to do a simple calculation in a dtml tag and print the result:
>
> <dtml-var expr="85 * HowOften">
>
> HowOften is a value that has been set by an HTML input in a web form. When
I
> run this with a value of 3 for the result is that it prints the character
3
> 85 times! So it treats it as a string.
>
> Obviously I need to convert HowOften to a float, but how do I do it?
>
> Cheers
>
> Marc
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>