EasyManua.ls Logo

Commodore 64 - Random Numbers and Other Functions

Commodore 64
176 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
CT is incremented by 1. The NEXT statement in line 30 automatically
sends the program back to line 10 where the FOR part of the FOR. . .
NEXTstatement is located. This process will continue until CT reaches the
limit you entered.
The variable used in a FOR . . . NEXT loop can be incremented by
smaller amounts than 1, if needed.
Try this:
If you enter and run this program, you'll see the numbers from 1 to
10, by .5, printed across the display.
All we're doing here is printing the values that NB assumes as it goes
through the loop.
You can even specify whether the variable is increasing or decreas-
ing. Substitute the following for line 10:
10 FOR NB
= 10 to 1 STEP-.5
and watch the opposite occur, as NB goes from 10 to 1 in descending
order.
40

Table of Contents

Other manuals for Commodore 64

Related product manuals