[Zope] why does this not work ?
Joachim Schmitz
perry@ac-copy.net
Sun, 22 Aug 1999 13:42:13 +0200 (CEST)
hi,
here is a code snipplet, which behaves misteriously (at least to me)
<!--#if find -->
<!--#call "REQUEST.set('qstemp',qs)" -->
<!--#in find -->
<!--#if sequence-start -->
Insgesamt <!--#var sequence-length --> Treffer<BR>
<!--#/if -->
qstemp: <!--#var qstemp --> index: <!--#var "_['sequence-index']" --><br>
<!--#call "REQUEST.set('si',_['sequence-index'])" -->
<!--#var si -->,<!--#var qstemp -->
<!--#if "si == qstemp" -->
equal
<!--#call "REQUEST.set('qs',_['sequence-index'] + 1)" -->
<!---------------------- Form-------------------->
Treffer Nr. <!--#var "_['sequence-index'] + 1" --><br>
<a href="<!--#var document_id-->?qs=<!--#var qs
-->&scol=<!--#var scol -->&srel=<!--#var srel
-->&sval=<!--#var sval
-->&go=<!--#var next -->"> nächster Treffer </a>
</center>
<!--#/if -->
<!--#/in -->
<!--#else -->
not equal
<!--#/if -->
when I call this the first time I get:
Insgesamt 9 Treffer
qstemp: 0 index: 0
0,0 equal Treffer Nr. 1
nächster Treffer qstemp: 0 index: 1
1,0 not equal qstemp: 0 index: 2
2,0 not equal qstemp: 0 index: 3
3,0 not equal qstemp: 0 index: 4
4,0 not equal qstemp: 0 index: 5
5,0 not equal qstemp: 0 index: 6
6,0 not equal qstemp: 0 index: 7
7,0 not equal qstemp: 0 index: 8
8,0 not equal
when I call it the second time, I get:
Insgesamt 9 Treffer
qstemp: 1 index: 0
0,1 not equal qstemp: 1 index: 1
1,1 not equal qstemp: 1 index: 2
2,1 not equal qstemp: 1 index: 3
3,1 not equal qstemp: 1 index: 4
4,1 not equal qstemp: 1 index: 5
5,1 not equal qstemp: 1 index: 6
6,1 not equal qstemp: 1 index: 7
7,1 not equal qstemp: 1 index: 8
8,1 not equal
apparently the if evaluates only to true, if both values are "0".
Any hint is welcome.
Gruß
Joachim Schmitz
WWW-Consultant
email: js@ac-copy.net
tel: +49-241-89491-0
fax: +49-241-89491-29