Walter Meester
HoogkarspelNetherlands
General information
Category:
Coding, syntax & commands
Environment versions
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.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only