Chapter 6. Control Statements: Part 2


Who can control his fate?

William Shakespeare, Othello

The used key is always bright.

Benjamin Franklin

Not everything that can be counted counts, and not every thing that counts can be counted.

Albert Einstein

Every advantage in the past is judged in the light of the final issue.

Demosthenes

Objectives

In this chapter you will learn:

  • The essentials of counter-controlled repetition.

  • To use the For...Next, Do...Loop While and Do...Loop Until repetition statements to execute statements in a program repeatedly.

  • To perform multiple selection using the Select...Case selection statement.

  • To use the Exit statement to break out of a repetition statement.

  • To use the Continue statement to break out of the current iteration of a repetition statement.

  • To use logical operators to form more complex conditions.

Outline

6.1 Introduction

6.2 Essentials of Counter-Controlled Repetition

6.3 For...Next Repetition Statement

6.4 Examples Using the For...Next Statement

6.5 GradeBook Case Study: Select...Case Multiple-Selection Statement

6.6 Do...Loop While Repetition Statement

6.7 Do...Loop Until Repetition Statement

6.8 Using the Exit Statement in Repetition Statements

6.9 Using the Continue Statement in Repetition Statements

6.10 Logical Operators

6.11 (Optional) Software Engineering Case Study: Identifying Objects' States and Activities in the ATM System

6.12 Wrap-Up



Visual BasicR 2005 for Programmers. DeitelR Developer Series
Visual Basic 2005 for Programmers (2nd Edition)
ISBN: 013225140X
EAN: 2147483647
Year: 2004
Pages: 435

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