Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To iif or not to iif = .t.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00513276
Message ID:
00513436
Views:
15
>>Hi Rip,
>>
>>In the Documents section here there is a document called "VFP: Do and don't". I think, these kind of things should be added into this document. Will you do this, please?
>>
>>George's comment is also valuable, though I found situations, when I can not avoid exit (if I'm in the for next loop for example)
>
>In many instances, the use of FOR...NEXT is quite simply the wrong choice of iteration structures. If the loop is to terminate conditionally, then DO WHILE...ENDDO is correct. There are exceptions, however. In this instance, performance may be a reason. However, in that case, you would need to be in the midst of an loop structure with many millions of iterations. Short of that, performance isn't an issue.

In that particular case I used as example, there are several loops one inside the other. All loops should run till completion if user doesn't terminate. I didn't see a simple way without using exit. I know, it's not a best way to use exit. While ago my husband described me problems with "go to" kind of operators. I'll discuss this problem with him again today.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform