AW: [Zope] How to multiply an integer in DTML?? [Solution]
I got the problem! The problem was somewhere in the variable lookup. In the document, where the multiplication took place, the variable var was overgiven by a form from another document. The multiplication worked fine, but the dtml-var expression returned the origin value as it was overgiven. So I just renamed the multiplicated one and it's done. Nevertheless thank you.
-----Ursprüngliche Nachricht----- Von: Joel Burton [SMTP:joel@joelburton.com] Gesendet am: Dienstag, 19. März 2002 16:57 An: Breitenreicher, Marc; zope@zope.org Betreff: RE: [Zope] How to multiply an integer in DTML??
Works just peachy for me:
<dtml-call "REQUEST.set('var', _.int(var)*5)"> <dtml-var var>
Call this script with ?var=5 and it prints 25. Why do you think this doesn't work? What are you getting?
Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton Knowledge Management & Technology Consultant
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Breitenreicher, Marc Sent: Tuesday, March 19, 2002 9:19 AM To: 'zope@zope.org' Subject: [Zope] How to multiply an integer in DTML??
Hi,
what I try to do is a short multiplication.
For example just multiply a variable with 5. I tried this, but doesn't work:
<dtml-call "REQUEST.set('var', _.int(var)*5)">
Can someone help me?
It is just that short multiplication, so I think it is not neccessary to build a python script.
Thanks a lot
Marc
_______________________________________________ Zope maillist - Zope@zope.org 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 )
participants (1)
-
Breitenreicher, Marc