Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do...[Statements] while [boolean] as in C#'.Net
Message
De
23/02/2007 11:58:57
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Do...[Statements] while [boolean] as in C#'.Net
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01198353
Message ID:
01198353
Vues:
53
Is there any type of loops statement in VFP which will evaluate the condition AFTER each iteration, rather than at the start of the loop? C#.Net has the "While" Statement, which is similar to VFP's "Do While". But C# also has the DO statement as in:

Do (statement(s)) while(booleanexpression) so that the statements are ran at least ONCE regardless of the value of the boolean expression.

Out of habit, and because I've never known any other way/work-around in VFP, I've done the following:

"Primer" the Do while first with (some list of statements)

Do while (lexpression)
(do the same statements above that I used to primer this do while loop, sometimes duplicating code, uggh.)
enddo

How do others out there do this? After working in C#, it seems that there must be a better way in VFP that I've never learned...Some sort of OOP implementation so that there is no duplicate code? I hope I'm making sense with my question here.

TIA for your input.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform