Information générale
Catégorie:
Codage, syntaxe et commandes
SCAN always reselects the right work area (the one the loop started in) when it reaches ENDSCAN, so you don't need to reselect even if you've changed work areas inside the loop. We know a lot of people who do so anyway. There doesn't appear to be a performance penalty for this, so if you're the belt-and-suspenders type, go right ahead.
FYI - I got this from The Hacker's Guide to Visual Foxpro 6 by Tamara Granor and Ed Roche. Per their experience there doesn't seem to be a performance hit by SELECTing the area again.... In fact, even though the SCAN/ENDSCAN will automatically move the pointer in the correct area, I would still re-select the area prior to the ENDSCAN line for readability/ease of understanding logic flow for readers of the code. Just personal pref..
Bill
Précédent
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