Going with the Flow Dude

Some programming newbies can't understand how a dumb computer can make intelligent decisions. The secret is in several programming constructs that most programming languages support. Table 10-1 provides a quick summary of these constructs. (I explain all of these later in this chapter.)

Table 10-1

Programming Constructs for Making Decisions

Construct

How It Works

GoTo statement

Jumps to a particular statement

If-Then structure

Does something if something else is true

Select Case

Does any of several things, depending on something's value

For-Next loop

Executes a series of statements a specified number of times

Do-While loop

Does something as long as something else remains true

Do-Until loop

Does something until something else becomes true

0 0

Post a comment