Walter Meester
HoogkarspelPays-Bas
Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Network:
Windows 2000 Server
>>>>>>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".
>
>You got wrong impression. There are real cases when you cannot fit all conditions into While expression. What are you going to do then? Continue to loop unnecessarily regardless that result already found?
Can you give an example ? I can't see any case where it technically is not possible. I do regard avoiding LOOP and EXITa good practise, however I tend to use them with FOR EACH commands as there is no real easy way arround it, other than using an IF condition that takes out the meat of the inner code if a certain condition is set to true. In that case I see an EXIT a better alternative.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement