␡
- 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.9 Do/LoopUntil Repetition Structure
The Do/LoopUntil structure is similar to the DoUntil/Loop structure, except that the loop-continuation condition is tested after the body of the loop is performed; therefore, the body of the loop executes at least once. When a Do/Loop Until terminates, execution continues with the statement after the LoopUntil clause. As an example of a Do/Loop Until repetition structure, once again consider the segment designed to find the first power of two larger than 1000:
Dim product As Integer = 1 Do product = product * 2 Loop Until product >= 1000