Home > Articles > Programming > Windows Programming

  • Print
  • + Share This
This chapter is from the book

3.7 DoUntil/Loop Repetition Structure

Unlike the While and DoWhile/Loop repetition structures, the DoUntil/Loop repetition structure tests a condition for falsity for repetition to continue. Statements in the body of a Do Until/Loop are executed repeatedly as long as the loop-continuation test evaluates to false. As an example of a DoUntil/Loop repetition structure, once again consider the segment designed to find the first power of two larger than 1000:

Dim product As Integer = 2

Do Until product >= 1000 
      product = product * 2 
  • + Share This
  • 🔖 Save To Your Account