Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help With scan...endscan (for / while)
Message
De
09/08/1999 13:11:59
 
 
À
09/08/1999 12:51:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00251485
Message ID:
00251598
Vues:
9
>>There is one subtle difference between SCAN/ENDSCAN and DO WHILE. Don't move the record pointer of the table being scanned. It gives really unpredicatble results.
>
>I know - the implicit SKIP creates a whole wealth of potential problems, including the accidental double SKIP, and more, ranging from not being sure exactly where the record pointer is after a new iteration starts, to not knowing if the filter condition broke because of repositioning the recorrd pointer. And probably a few really bizarre ones that I haven't seen

And one more reason SCAN is better. If you change the current alias in the SCAN loop, you don't have to worry about changing it back at the end, because SCAN does resets it for you. In fact, from what I can tell, setting it back yourself slows the loop.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform