Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Coding Standards
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00115272
Message ID:
00115951
Views:
17
Yes, there is. But it works in VFP (it doesn't work in Pascal, for example).

If I have to chose between an EXIT and changing the index value, I change the index value. The difference is that the code between the index change and ENDFOR gets executed every time (this doesn't happen with EXIT). This is important especially in FoxPro where so many things "happen" because of SET commands and because of current program status (alias, index, etc).

I've seen countless bugs because some code was skiped because of a LOOP or EXIT. And these bugs are (usually) not in the first version, but they are introduced later, when the code is modified without considering the situation when the loop is forced.

Vlad

>You're right, no EXIT :) But then isn't there another principle about not altering a FOR index value inside the loop?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform