General information
Category:
Coding, syntax & commands
Title:
Do...[Statements] while [boolean] as in C#'.Net
Environment versions
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.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only