[Zope] The For loop.

Small Business Services toolkit at magma.ca
Fri Apr 23 14:34:27 EDT 2004


From: "Fernando Lujan" <fernando.lujan at nube.com.br>
> Hi, I'm still not using ZPT here in my company, but I need to do a For
> Loop. How could I do it? I need something like the algorithm below:
>
> for i = 1 to N do
> execute ZSQL Method(var[1], var2[i])
> end

Try (untested) something like:

<dtml-in "_.range(1, N, 1)">
   <dtml-call "method( var[_['sequence-number']],
var2[_['sequence-number']] )">
</dtml-in>


HTH

Jonathan





More information about the Zope mailing list