EasyManua.ls Logo

Commodore VIC-20 - Page 73

Commodore VIC-20
404 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...
Chapter 3 Programming the
VIC
20
Computer
59
automatically insert this statement between lines
160
and
170.
This may be
illustrated as follows:
Line
numbers
displayed
when
you
entered line 165
120
130
140
150
160
170
180
190
165
Lines
stored
and
redisplayed
thus
120
130
140
150
160
165
170
180
190
If the line number for a new statement duplicates
an
existing line
number, the old statement will be replaced.
VIC BASIC allows line numbers to range between 1 and 63999. The
VIC computer interprets digits appearing
at
the beginning
of
any line as the
line number.
If
the line number
is
larger
than
63999, a syntax error message
appears, since you have violated one
of
the syntax rules for VIC BASIC.
All BASIC dialects require line numbers to be assigned in ascending
order, as described above. However, the largest line number allowed varies
from one dialect
of
BASIC to the next.
You use line numbers as
addresses, identifying locations within a
program. This
is
an
important concept, since every program will contain the
following two types
of
statements:
1.
Statements that create
or
modify
data
2.
Statements
that
control the sequence m which operations are
performed.
The idea
that
operations specified by a program must be performed in
some well-defined sequence is a simple enough concept. Program execution
normally begins with the first statement in the program and continues
sequentially. This may be illustrated as follows:
Start-lO-.....,
C
20
--'
30-.....,
C
40
--'
50-.....,
C
60
.......
70-.....,
C
80
--'
etc.

Other manuals for Commodore VIC-20

Related product manuals