Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DO WHILE vs SCAN WHILE...?
Message
De
23/06/2005 20:56:54
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
23/06/2005 20:00:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01026042
Message ID:
01026134
Vues:
17
>>>What would be the difference in using DO WHILE vs SCAN WHILE...?
>>>Is there a performance issue?
>>>
>>>Thanks in advance, M.
>>My preference is for SCAN. In addition to what has been said, I think it is slightly cleaner especially if you have both a WHILE and FOR clause.
>>
>>One thing to be aware of, however. Nested SCANs do not work as expected because of the extra SKIP at the second ENDSCAN.
>
>Huh? I've never seen anything like that.

Well, nested scans on the same table:
scan
   <...some code>
      scan
         <more code>
      endscan   && implicit skip here
endscan   && another one
For such purposes, I usually keep only the innermost scan, and the outer loop is a Do While !eof().

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform