Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
New VFP feature I didn't know about. Did you?
Message
De
25/07/2000 02:05:35
 
 
À
20/07/2000 23:07:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00395202
Message ID:
00396469
Vues:
8
John,

The automatic "Select" was a feature of the Scan loop since the beginning of the Scan Loop. I believe that means Foxpro 2.6.

PF

>Hey UT folks -
>Sometimes I feel like a total idiot savant with VFP. Some features I know as well as the people who designed them, then I hit something like this .. which is probably something everyone but me knew about.
>
>Here's the feature I didn't know about, but came across by accident:
>
>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?
>
>Here's an example program:
>
>SELECT j1
>
>SCAN
> SELECT j2
> LOCATE FOR ord = j1->rec
> IF NOT FOUND()
> APPEND BLANK
> REPLACE ord with j1->rec
> ENDIF
>ENDSCAN
>
>Now I would have expected this to bomb, because I didn't issue a 'SELECT j1' after the REPLACE and there's no 'ord' field on the 'j2' file. But when the program hits the ENDSCAN, it reverts to 'j1' automatically!
>
>Please someone tell me this is new and not been around since VFP 3 or FoxPro 1.0. Yeesh!

(On an infant's shirt): Already smarter than Bush
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform