Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Please explain 'DO WHILE .T.'
Message
De
23/12/1999 12:13:28
Bob Tracy
Independent Consultant
Driftwood, Texas, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00307982
Message ID:
00307995
Vues:
21
>Relative newbie question....
>
>I'm supporting a VFP6 app written by a developer who was familiar with FPW 2.6 and never really took the time to get up to speed on VFP6. In several places, he uses the DO WHILE .T. .... ENDDO construct.
>
>Hacker's Guide describes it as being a poor programming practice, but doesn't explain the logic. Help has an example in the DO WHILE article, but doesn't explain what is being tested for a .T. condition.
>
>My problem is in thinking through the logic. What is the condition being evaluated, and when does it evaluate to .T. or .F.?
>
>Can someone please enlighten me?
>
>Thanks and Merry Christmas.....
>
>Neil Preston

Hi Neil,

I'll try, but I'm no expert. DO WHILE is evaluating a boolean expression..
.NOT. EOF(), N = 3, etc.. The loop executes as long as the expression is true. Using DO WHILE .T. just says "run this loop until I tell you to EXIT or CANCEL". There is no boolean expression to evaluate, the condition is always true. It is not good programming practice but I must admit I did use it before timers were available.
Bob Tracy

Never engage in a battle of wits if you're only half armed.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform