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
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