The use of the variable name is optional, but if you are using many loops in a

program, including the name makes the program easier to follow.

You can change the step size so that count does not increase by 1:

20 FOR count=7 TO 50 STEP 2

The step size can be decimal:

20 FOR count=3 TO 10 STEP 1.6

It can even be negative, although the start and end values for the loop must

also be adjusted so that the loop starts with the highest value:

20 FOR count=20 TO 1 STEP -1

Of course, the loop values can also be variables. You can experiment with loops

by adding these lines and running the program a few times:

15 INPUT "What is the start, end and step size ",start,end,step

20 FOR count=start TO end STEP step

Here is a brief program which shows the power of the loop:

10 MODE 2

20 PR0Cmodern_art

30 END

40 DEFPR0Cmodern_art

50 FOR count=l TO 50

60 PR0Ccircle(RND(1279) ,RND(1023) ,RND(200),RND(7))

70 NEXT count

80 ENDPROC

90 DEFPR0Ccircle(xcentre%,ycentre%,radius%,colour%)

100 GCOL 0,colour%

110 MOVE xcentre%,ycentre%

120 PLOT 157,xcentre%+radius%,ycentre%

130 ENDPROC

RND produces a random whole number between 1 and the bracketed value.

Line 60 draws a random-sized circle in a random position and random colour by

calling PROCcircle with random parameters.

You may get an idea how some of the Welcome software works by running the

program again using these lines:

50 FOR count=7 TO 1 STEP -1

60 PR0Ccircle(640,512,count*50,count)

C 38