[Zope] Simple calculation

Marc Burgauer marc@sharedbase.com
Mon, 24 Feb 2003 17:01:00 +0000


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