Commodore 64 User Manual page 129

Hide thumbs Also See for 64:
Table of Contents

Advertisement

room in memory, so don't create an array much larger than you'll need.
To figure the number of variables created with DIM, multiply the total
number of elements in each dimension of the array.
10 DIM A$(40), B7(15), CC%(4,4,4)
T T T
41 ELEMENTS 16 ELEMENTS 125 ELEMENTS
You can dimension more than one array in a DIM statement. How-
ever, be careful not to dimension an array more than once.
END
When a program encounters an END statement , the program halts, as
if it ran out of lines. You may use CONT to restart the program.
FOR . . . TO . . . STEP
This statement works with the NEXT statement to repeat a section of
the program a set number of times. The format is:
FOR (Var. Name)=(Start of Count) TO (End of Count) STEP(Count By)
The loop variable will be added to or subtracted from during the
program. Without any STEP specified, STEP is assumed to be 1. The start
count and end count are the limits to the value of the loop variable.
10 FOR L = 1 TO 10 STEP .1
20 PRINT L
30 NEXT L
The end of the loop value may be followed by the word STEP and
another number or variable. In this case, the value following STEP is
added each time instead of 1. This allows you to count backwards, or
by fractions.
GET
The GET statement allows you to get data from the keyboard, one
character at a time. When GET is executed, the character that is typed is
assigned to the variable. If no character is typed, then a null (empty)
character is assigned.
119

Hide quick links:

Advertisement

Table of Contents
loading

Related Products for Commodore 64

Table of Contents