General information
Category:
Coding, syntax & commands
>Hi All. I have been reading some threads about SCAN - ENDSCAN. Due to old habits I have used DO WHILE but am interested in the speed improvements that SCAN ENDSCAN appear to offer.
>
>Any gotchas to watch out for when converting DO WHILE loops to SCAN ENDSCAN? I did read Dragan's comment about nested SCAN's on the *same* file. Are there any others?
Don't forget to take the SKIP command out.
FWIW, last time I tested (which was with VFP 7), on an unordered table, SCAN was about 1.5 times as fast as DO WHILE. For ordered tables, it's not quite as clear-cut; the differences seem to depend on the index order.
But overall, you can't go wrong using SCAN for looping through a table.
Tamar
Previous
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