Information générale
Catégorie:
Codage, syntaxe et commandes
>Hey UT folks -
>Did you know that when you issue a SCAN/ENDSCAN VFP automatically flips a SELECT back to the correct file when hitting the ENDSCAN without you having to explicitly doing so?
>
>
>Please someone tell me this is new and not been around since VFP 3 or FoxPro 1.0. Yeesh!
I'm pretty sure this has been around since FP 2.6
CLOSE DATA
USE table2
SELE 0
USE table1
SCAN
? ALIAS()
SELECT table2
ENDSCAN
This little program printed 'TABLE1' for each record in the table.
OTOH - I got into the habit of re-selecting the table I'm scanning because it made the code a little easier to read and maintain (even if only in my mind) when I, or another maintenance programmer would come back to it later.
Précédent
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