Answer:

Many of the notes are illustrated by this program, as seen below.

Several Notes Illustrated

The program is correct, so all the syntax notes are followed. The loop body in this program only has one statement.

  1. counter is a numeric variable.
  2. You can use counter in the loopBody, but don't change it (this happens automatically with the NEXT.)
  3. startingValue and endingValue can be arithmetic expressions or variables.
  4. loopBody can be any number of statements.
  5. NEXT counter shows the end of the loop body.

Here is the program with four of the notes illustrated.

' Counting Loop 
'
LET START = 1      ' Note 3
LET FINISH = 5     ' Note 3
FOR I = START TO FINISH	    ' Notes 1 and 3
  PRINT I;                  ' Notes 2 and 4
NEXT I              ' Note 5
END

This program prints the integers from one to five, all on one line.

QUESTION 8:

Does syntax tell you how the FOR statment works (not just how it looks)?