Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Coding Standards
Message
 
À
10/07/1998 10:18:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00115272
Message ID:
00116125
Vues:
26
Mornin' Gonz,

>Hi Bruce, George,
>
>I have to agree with Bruce...I always use the "!" for NOT.
>
You would! :-) Actually, it's merely a personal preference. If you guys are comfortable with it, good for you. I'm not, good for me.


>Anyway, as to the continued raging debate about DO WHILE versus FOR..ENDFOR, you have to either force an EXIT or change the logical condition to get out of a DO WHILE, right? So, actually, FOR..ENDFOR is a different animal altogether because it acts upon the conditions of the loop itself, incrementally.
>
>So maybe it could be stated that DO WHILE is preferred when the repetitive actions are of indeterminate duration or until a logical flag is set while FOR..ENDFOR is for situations where the number of actions is determined or can logically be determined as a number by program heuristics.

You've pretty much touched on my point. FOR...ENDFOR for a fixed number of iterations. DO WHILE if it's conditional. (I still want a true post-test iteration structure.)
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform