Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Repeat Repeat Repeat code?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00211108
Message ID:
00211136
Vues:
26
>I have code in the Activate Event of a form.
>
>SCAN
>
>here is my code
>
>LOOP
>ENDSCAN
>
>But when I finish scanning (caused by EOF), I want to go back and start the SCAN process all over again.
>
>In other words, I want to keep scanning and stay in a continuous loop.
>
>What would be the best way to do that?
DO WHILE .T.
   SELECT SometableToScan
   GO TOP
   SCAN
     * Do Whatever
     IF <i>RestartScanNeeded</i>
        EXIT
     ENDIF
   ENDSCAN
ENDDO
Obviously, you need something to exit from the DO WHILE .T. loop at some point. Also, note that this looping may be tight, and you may need to explicitly put a DOEVENTS() somewhere to let VFP respond to UI events intermittently, which will degrade the loop performance a bit.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform