Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Do while not eof and scan endscan
Versions des environnements
Can someone please tell me why I should get two different answers using
"do whil not eof()" and "Scan endscan" as below :
** In this do whil loop, I get 5 records
select kpinx1
zap
select kpin
go top
do whil not eof()
if not empty(dtime1)
skip
loop
endif
if trayout1 = 0 and trayout2=0 and trayout3 = 0
skip
loop
endif
scatter memvar
INSERT INTO kpinx1 from memvar
select kpin
skip
enddo
select kpinx1
go top
brows
*** In this scan loop, I only get 2 recrods
select kpinx1
zap
select kpin
go top
scan
if not empty(dtime1)
skip
loop
endif
if trayout1 = 0 and trayout2=0 and trayout3 = 0
skip
loop
endif
scatter memvar
INSERT INTO kpinx1 from memvar
endscan
select kpinx1
go top
brows
Thanks
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement