Chapter 12. Program Loops


Chapter 12. Program Loops

In this chapter, you will learn the following:

  • Loop structure

  • A simple program loop

  • The For- Next loop

  • Using a For-Next loop to implement an algorithm

  • For loops and arrays

  • Exit For ”getting out of a For loop early

  • Nested For loops

Computers excel at repetitive tasks. Computers don't get bored, they don't get distracted, they (usually) don't take breaks, and they do what they're told. Program loops are often used to automate repetitive tasks. In this chapter, we'll explore how to use program loops to perform certain tasks multiple times. You'll also learn that there are well-behaved loops and there are ill-mannered loops. Obviously, I want you to understand the difference. As you'll discover in this (and the next) chapter, Visual Basic .NET provides you with a variety of loop structures.

Although this chapter concentrates on For - Next loops, you need to have a general understanding of how program loops work. Because you do have a choice as to the type of loop you can use, understanding how each one works enables you to make better choices as to which is best for a given task.



Visual Basic .NET. Primer Plus
Visual Basic .NET Primer Plus
ISBN: 0672324857
EAN: 2147483647
Year: 2003
Pages: 238
Authors: Jack Purdum

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net