Using the Cursor Keys Inside Quotes with the PRINT
Command
When you type the cursor keys inside quotation marks, graphic
characters are shown on the screen to represent the keys. These
characters will NOT be printed on the screen when you press
RETURN. Try typing a question mark (?), open quotes (SHIFTed
2 key); then press either of the down cursor keys 10 times, enter
the words “ DOWN HERE”, and close the quotes. The line should
look like this:
DOWN HERE”
Now press RETURN. The Commodore 128 prints 10 blank lines,
and on the eleventh line, it prints “DOWN HERE”. As this example
shows, you can tell the computer to print anywhere on your
screen by using the cursor control keys inside quotation marks.
BEGINNING TO PROGRAM
So far most of the commands we have discussed have been
performed in DIRECT mode. That is, the command was executed
as soon as the RETURN key was pressed. However, most BASIC
commands and functions can also be used in programs.
What a Program Is
A program is just a set of numbered BASIC instructions that tells
your computer what you want it to do. These numbered
instructions are referred to as statements or lines.
Line Numbers
The lines of a program are numbered so that the computer knows
in what order you want them executed or RUN. The computer
executes the program lines in numerical order, unless the
program instructs otherwise. You can use any whole number
from 0 to 63999 for a line number. Never use a comma in a line
number.
Many of the commands you have learned to use in DIRECT
mode can be easily made into program statements. For example,
type this:
10 ? “COMMODORE 128” nETUHN
3-15