EasyManua.ls Logo

Commodore VIC-20 - Page 274

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...
260
The
VIC
20
User
Guide
computer then does a carriage return, and the next character
is
input with
the next GET#.
At the end
of
each string, the computer automatically adds a carriage
return, which acts as a delimiter separating one string from the next. This
is
usually desirable, since it causes the computer to separate the variables.
In
some applications, however, you may want
to
eliminate the trailing carriage
returns.
For
example, you may want to conserve space in a tightly-packed
file in which all the variables
or
strings are
of
the same length.
In
such a case,
you could leave
out
the carriage returns
and
separate the variables yourself.
Remember, however, if you create a file that has no delimiters (carriage
returns) you must separate the
data
yourself in your program.
To
suppress
the carriage returns you could change line 40 to read
40
PRINT011
A$i
Note: Generally the best programs are the ones
that
are the simplest.
Therefore, before you use this method be sure
that
you need to. Also be
aware
that
a file with no delimiters cannot be read by
an
INPUT# statement
unless it contains less than
80
characters because the
INPUT
buffer holds
only
80
characters.
Disk
Flies
The disk drive can store
data
and programs
just
as the Datassette does.
The major differences between the disk drive and the Datassette are speed
and accessibility.
The disk drive can access
data
much faster
than
the Datassette, and can
access them randomly.
That
is, the drive can access any location on the
disk's surface to read
or
write data, while the Datassette must read
and
write
all data sequentially.
HOW
DATA
ARE
STORED
ON
DISKlnE
The
data
are stored on the diskette in concentric rings called tracks. The
1540
Disk Drive has a total
of
35
tracks. Each track may be addressed
directly and therefore may be quickly accessed. In general, the disk drive will
not record
data
onto
an
entire track. This would make the files needlessly
long.
To
avoid this, each track is divided up into sectors, each
of
which
contains 256 bytes.

Other manuals for Commodore VIC-20

Related product manuals