General information
Category:
Coding, syntax & commands
Title:
Do while not eof and scan endscan
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only