Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Coding Standards
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00115272
Message ID:
00115951
Vues:
18
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?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform