Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scan...EndScan
Message
De
31/10/1998 10:52:43
 
 
À
31/10/1998 08:12:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00153139
Message ID:
00153166
Vues:
24
>SCAN scope is suposed to be ALL by default, but maybe ALL forces going top before start scanning and maybe scan without all doesn't work if you are at EOF(). (like replace, wich does not do anything if eof() on current table).

The WHILE forces a scoping based on a continuing evaluation of the condition; once the condition is not met, the loop exists, so it implies a REST scope (ie I've positioned where I want to be, so do this as long as the condition specified is true.) If you wanted to process all all records meeting the condition, you'd SCAN FOR !llErr, which implies an ALL scoping.

>
>Well, I always GO TOP before SCAN and always SELECT ScanningTable before ENDSCAN.
>
>>Just queer, but on the same event, the first doesn't work, but putting ALL makes all the difference. Any idea?
>>
>>
>>#1 :-
>>
>>llErr = .F.
>>SCAN WHILE !llErr
>> * Commands
>>ENDSCAN
>>
>>
>>#2 :-
>>
>>llErr = .F.
>>SCAN ALL WHILE !llErr
>> * Commands
>>ENDSCAN
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