Chapter 5. Control Statements: Part 1


Let's all move one place on.

Lewis Carroll

The wheel is come full circle.

William Shakespeare, King Lear

How many apples fell on Newton's head before he took the hint?

Robert Frost

All the evolution we know of proceeds from the vague to the definite.

Charles Sanders Peirce

Objectives

In this chapter you will learn:

  • To use the If...Then and If...Then...Else selection statements to choose among alternative actions.

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

  • To use the compound assignment operators to abbreviate assignment operations.

  • To use counter-controlled repetition and sentinel-controlled repetition.

  • To use nested control statements.

  • To add Visual Basic code to a Windows application.

Outline

5.1 Introduction

5.2 Control Structures

5.3 If...Then Selection Statement

5.4 If...Then...Else Selection Statement

5.5 While Repetition Statement

5.6 Do While...Loop Repetition Statement

5.7 Do Until...Loop Repetition Statement

5.8 Compound Assignment Operators

5.9 Counter-Controlled Repetition

5.10 Sentinel-Controlled Repetition

5.11 Nested Control Statements

5.12 Nested Repetition Statements

5.13 Visual Basic Programming in a Windows Application

5.14 (Optional) Software Engineering Case Study: Identifying Class Attributes in the ATM System

5.15 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