ChaDter
4
GENERAL
INFORMATION
When BASIC displays the Ok prompt, you can type in program
lines or commands. If you want BASIC
to
read what you type in,
you must press
[ENTER]
at
the end
of
the line.
A single line can be a maximum
of
255
visible characters. Visi-
ble characters are those that take up
a
space on the display.
Since
255
characters cannot fit on one line
of
the display, BASIC
moves the extra characters
to
the next line. This is called
wrap-
around.
BASIC looks at the first character
of
a
line. If it is
a
digit,
BASIC stores the line in memory
as
a
program line. For exam-
ple, if you type:
10
PRINT "THE
TINE
IS
"
TIME$
(ENTER]
BASIC takes this
as
a program line and stores it in memory. It
does not execute the line until you type
RUN
and press
m.
If the first character is not a digit, BASIC tries to execute the
line
as
a command. For example, if you type:
MILES=133:GALLON=11:MPG=MILES/G~LLON
BASIC immediately executes this line as
a
command. After it is
executed, the statement no longer exists in memory, but the val-
ues
of
the variables MILES, GALLON, and MPG are stored in
memory.
This BASIC capability lets you use the computer
as
a calculator
for quick computations that
do
not require an entire program.
Editing
BASIC
lets you correct errors in program and command lines
quickly and efficiently without retyping entire lines.
You can use the special keys defined at the end
of
this chapter
to
make corrections or changes at any time. To correct a line, sim-
ply use the arrow keys to position the cursor on the line you
want to alter. After you make changes to the line, press
(ENTER)
to
store the changes.
33