Andy McKay writes:
 > <dtml-var "3/2" fmt="%.2d"> instead of getting 1.50 as I was expecting I get
 > 1.00, I never seem to be getting decimals. Whats the obivous thing Im
 > missing here?
This is a Python feature:

  If both arguments are integers, the division is performed
  as an integer division.

  Use "3.0/2" or "3/2.0" or "float(3)/2"  to get a floating point division.


Dieter

_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to