Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Do...[Statements] while [boolean] as in C#'.Net
Versions des environnements
Network:
Windows 2000 Server
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement