Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
New VFP feature I didn't know about. Did you?
Message
 
À
21/07/2000 13:43:37
Christian Berrigan
Enterprise Data Solutions, Inc.
Brush Prairie, Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00395202
Message ID:
00395661
Vues:
9
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
THERE IS A HUGE GOTCHA WITH THIS "FEATURE"

If, in the course of your scan loop the currently selected alias (not the alias you are SCANning) ends up on EOF(), then, when you hit the END SCAN you will exit the loop even though you are not EOF() on the actual alias you're scanning.

ALWAYS reselect the alias you are scanning before the END SCAN
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

I'd be interested in seeing the code that does that, Christian. I just tried something similar, and had no problem.

I do have my own "gotcha" to add to the discussion, though -- when using a SCAN..ENDSCAN within another SCAN...ENDSCAN I have run into intermittent problems with restoring the alias upon the second ENDSCAN. In other words, if I nest SCAN..ENDSCAN, I do actually try to restore the alias, because FoxPro would sometimes seem "confused" by the nested SCANs.

I haven't noticed this since 5.0 though, so I wonder if 6.0, or SP3, solved it... or maybe I just stopped coding this way so I stopped noticing!
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform