Revisions: 08/24/01; 11/25/04 -- format changes

CHAPTER 19 — FOR Loops

This chapter discusses another way of doing loops: the FOR statement. FOR statements are especially convenient for implementing counting loops. DO WHILE loops can be used for the same purpose, but are less convenient.

Chapter Topics:

QUESTION 1:

(Review:) What will this loop print out?

' Counting Loop
'
LET COUNT = 0            'Statement 1
'
DO  WHILE COUNT <= 2     'Statement 2
  PRINT COUNT            'Statement 3
  LET COUNT = COUNT + 1  'Statement 4
LOOP 
END