Re: [Zope] adding values with <!--#in-->
12 Jul
1999
12 Jul
'99
1:52 p.m.
At 15:19 12/07/99 , Alexander Schad wrote:
Hi!
I'm iterating over a set of floating point values, using the <!--#in--> tag and want to add them up to get a total sum. Any clues?
Bye, Alex
Use a REQUEST variable: <!--#call "REQUEST.set('total', 0.0)"--> <!--#in FloatList--> <!--#call "REQUEST.set('total', total + _['sequence-item'])"--> <!--#/in--> Note: This code is untested. YMMV. -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-7502100 Fax: +31-35-7502111 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
9765
Age (days ago)
9765
Last active (days ago)
0 comments
1 participants
participants (1)
-
Martijn Pieters