O'Reilly logo

Access 2002 Programming by Example by Bob Villareal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

More Than One Way to Loop

A loop is a repetitive programming construct that allows a statement or a series of statements to process over and over again until a condition is met. Consequently, loops provide an excellent way to cycle through code. If you are examining a string, you can cycle through one character or word at a time. If you are incrementing a number, each loop can add another value to your number. If you are looking for an object in a collection of objects, the loop is the perfect vehicle to enumerate (list) your objects.

Do..Loop

The Do..Loop statement executes code inside the Do..Loop either while a condition remains true or until a condition becomes true, depending on how the statement is constructed. There are two ways to use ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required