using do...loop until
-
hi, I'm using vb.net and I just want to ask about the do...loop until command. I understand that this is used whenever we want to do a condition all over again until it is true.. But what if it comes out till the end as false? How will I put it into code.. in such way as:
Do loop until
hope anyone can help me solve this out.. thanks.. ange -
hi, I'm using vb.net and I just want to ask about the do...loop until command. I understand that this is used whenever we want to do a condition all over again until it is true.. But what if it comes out till the end as false? How will I put it into code.. in such way as:
Do loop until
hope anyone can help me solve this out.. thanks.. angeAbbhie wrote:
But what if it comes out till the end as false? How will I put it into code..
something = False
Upcoming FREE developer events: * Glasgow: db4o: An Embeddable Database Engine for Object-Oriented Environments, Mock Objects, SQL Server CLR Integration, Reporting Services ... My website
-
Abbhie wrote:
But what if it comes out till the end as false? How will I put it into code..
something = False
Upcoming FREE developer events: * Glasgow: db4o: An Embeddable Database Engine for Object-Oriented Environments, Mock Objects, SQL Server CLR Integration, Reporting Services ... My website
-
I want to put another statement if the result of the looping is still false (after its process)
The do loop checks at the end of the run whether the condition is true. If it is true it terminates. If the condition is still false, it starts again at the "do". Maybe you want to add another condition like do ... loop until (condition1=true or condition2=true) ?
-
I want to put another statement if the result of the looping is still false (after its process)
The Do While loop will run continuously until the condition is true. There is no alternate "end" of the loop. If that's a possibility, maybe you should be considering a different loop type, such as For/Next.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
The Do While loop will run continuously until the condition is true. There is no alternate "end" of the loop. If that's a possibility, maybe you should be considering a different loop type, such as For/Next.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Thanks Dave.. I was thinking of that too as an alternative. But I just don't know what's that for and how to use it. i just saw it in the MSDN Support.
If you don't know what a For/Next loop is, you REALLY need to pick up a beginners book on VB.NET. A For/Next loop is one of those very basic concepts they teach on the second day of class in any course involving VB.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007