Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Loops
Message
De
04/04/2007 11:25:31
 
 
À
04/04/2007 04:58:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Loops
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01211796
Message ID:
01212036
Vues:
14
>>>>>>Does a scan endscan loop exit at the bottom of the loop or at the top?
>>>>>
>>>>>It goes from top to bottom.
>>>>
>>>>Yes, that's right. But, a do while loop loops and at the end it exits the loop at the top. I believe that a for next loop runs and exits at the bottom.
>>>
>>>I don't see why it's important. One should not write code based on these assumptions. Either you exit loop specifically (by Exit) or you don't care.
>>
>>I was under the impression that if you have an EXIT in there, then the alogorythm isn't really designed "properly".
>
>I'm TOTALLY with you there! I've just had some nightmare code to follow, with 100 meter-long Do while loops (with loops withing loops) and EXIT and LOOP statements all over the place. Would that they'd never been invented!

Don't blame the tool for its misuse (where have I heard that arguement before?????) There are times when EXIT is simply the cleanest way to exit the loop

The problem isn't with the EXIT/LOOP statement per se. It's with the poor initial design of the program.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform