[Zope] For loops in dtml
Shalabh Chaturvedi
shalabh@pspl.co.in
Wed, 23 Feb 2000 22:10:39 +0530
The range function is probably what you need:
<dtml-in "_.range(1,100,5)">
<dtml-var sequence-item>
</dtml-in>
..gives..
1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96
Cheers,
Shalabh
____________________________________________
>>> print reduce(lambda c,d:chr(ord(d)-2)+c,
'>pk0qe0nrurBjdcncju>\"kfgxtwvcjE\"jdcncjU\014')
____________________________________________
----- Original Message -----
From: Chris Withers <chrisw@nipltd.com>
To: Zope Mailing List <zope@zope.org>
Sent: Wednesday, February 23, 2000 9:48 PM
Subject: [Zope] For loops in dtml
> Anyone know how I can do the equivalent of the following in dtml:
>
> for (int i=0; i<count; i++)
> {
> ...stuff...
> }
>
> or even
>
> int i=0;
> while (i<count)
> {
> ..stuff..
> i++;
> }
>
> cheers,
>
> Chris
>
> _______________________________________________
> 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 )