How do you access the random/randint function via dtml? I need to be able to generate several unique random numbers in the same document one after another. I thought it would be something like <!--#var "_.random()"--> but this doesnt work. thanks KH
Kevin Howe wrote:
How do you access the random/randint function via dtml? I need to be able to generate several unique random numbers in the same document one after another.
I thought it would be something like <!--#var "_.random()"--> but this doesnt work.
thanks KH
You're probably looking for <!--#var "_.whrandom.random()"-->
It's <!--#var "_.random.random()"--> *or* <!--#var "_.whrandom.random()"--> Nick Garcia | ngarcia@codeit.com CodeIt Computing | http://codeit.com On Thu, 7 Oct 1999, Kevin Howe wrote:
How do you access the random/randint function via dtml? I need to be able to generate several unique random numbers in the same document one after another.
I thought it would be something like <!--#var "_.random()"--> but this doesnt work.
thanks KH
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(Related lists - please, no cross posts or HTML encoding!
To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
Try _.math.random() -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Kevin Howe Sent: 08 October 1999 00:10 To: zope@zope.org Subject: [Zope] random numbers How do you access the random/randint function via dtml? I need to be able to generate several unique random numbers in the same document one after another. I thought it would be something like <!--#var "_.random()"--> but this doesnt work. thanks KH _______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope (Related lists - please, no cross posts or HTML encoding! To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
participants (4)
-
Kevin Howe -
Morten W. Petersen -
Nick Garcia -
Phil Harris