[Zope] expression evaluateion
Kevin Dangoor
kid@kendermedia.com
Thu, 16 Mar 2000 09:24:39 -0500
----- Original Message -----
From: "Chien-pin Wang" <cpw@suprize.com>
To: <zope@zope.org>
Sent: Thursday, March 16, 2000 12:57 AM
Subject: [Zope] expression evaluateion
> Zope seems to evaluate expressions in an unconventional way.
> Say I have three properties, a=3, b=5, c=7 set in a Folder. In
> a DTML Document I tried to say <dtml-var "a/b*c"> and got result
> 0.
Your properties look like integers, and I believe that is your problem. Try
this:
<dtml-var "_.float(a)/b*c">
By converting a to a float and then doing the rest of the expression, python
should consider the whole expression to be floating point.
Kevin