␡
- Introduction
- Control Structures
- If/Then Selection Structure
- If/Then/Else Selection Structure
- While Repetition Structure
- DoWhile/Loop Repetition Structure
- DoUntil/Loop Repetition Structure
- Do/LoopWhile Repetition Structure
- Do/LoopUntil Repetition Structure
- Assignment Operators
- For/Next Repetition Structure
- Example: Using the For/Next Structure to Compute Compound Interest
- SelectCase Multiple-Selection Structure
- Using the Exit Keyword in a Repetition Structure
- Logical Operators
- Introduction to Windows Application Programming
- Summary
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 Loop