EasyManua.ls Logo

Commodore CBM - Line Numbers

Commodore CBM
447 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...
A BASIC statement becomes part of a program if
you
begin the state-
ment
with
a line number. The
nu
mber becomes the
statemenf
s identification.
just
as
numbers are used to identify individual hou
ses
on a street. For example. if
vou type:
instead of:
Vou
create a statement
that
becomes part of a program that
will
not execute
until
vou specifically run the program.
Every statement in a BASIC program
must
have a line number. The numeri-
cal value of the line number specifies the order
in
which the statements
in
the stored program are to be executed when the program
is
run.
The smallest
line number identifies the first statement
in
the program and the largest line
number identifies the last statement
in
the program. Statements in between
will
be
organized
in
order of ascending number sequence. The
PET
BASIC in-
terpreter takes care of that for vou. If vou enter a statement out of its number se-
quence. the BASIC interpreter
will
move the number
to
its correct sequential posi-
tion (whether vou
want
it there or not).
Remember.
the PET BASIC interpreter
will
always arrange BASIC state-
ments
in
ascending order of line numbers. A number at the beginning of a
BASIC statement puts the statement
into
a program
which
does nothing until vou
deliberately run it.
When
running a program, statements are executed one at a
time. Statements are executed in sequence of ascending statement numbers
(unless a statement explicitly changes the execution sequence by branching
to
a
statement elsewhere in the program).
110
120
123
129
137
On the
PET,
a line number can be any integer from 0 to
63999.
oS line number S 63999.
77

Table of Contents

Other manuals for Commodore CBM

Related product manuals