EasyManua.ls Logo

Commodore PET - Page 251

Commodore PET
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 good
way
to visualize
what
constitutes a file
is
to picture
an
address book.
The address book may
be
a book, file cabinet. or cassette tape. The address book
is
then divided into 26 sections by letter: A through
Z.
Each
section contains a
collection of names and addresses of people whose last
na
me starts
with
the par-
ticular letter.
We
will
cali these alphabetic sections files. Therefore, the address
book
is
divided into 26 files, each file referenced by a letter:
Berkeley. CA
Steve Alberts
336
Rose
51
654-3211
I--,-Ac.:::0c.:0:...;R..:.;E=-S::.:S:..,Br:-0=-O.:....-K
--r:~~_-
Fil
e 1(A )
JoeAdams
A~
533-6564
~~.f4Io---
File
2(
B)
~
-File
3(C)
,
G
H
,
,
Gloria
Amold
777 Greenfield 456·7890
Hayward.
CA
K
,
M
N
o
u
V
W
x:::::-
File
25(Y)
'---------
~F
ile
26(Z)
Each file
is
further divided into records. The
na
me,
address, and telephone
number of each person in the address book constitutes a record:
1",,,,
#2
l,,,,,,
#3
Joe
Adams
~
563
Bancroft
Way
533-6564
Bend,
CA
Steve
Alberts
336
Rose St.
654-3211
Berkeley,
CA
Gloria
Arnold
777
Greenfield
456-7B90
Hayward,
CA
}
"",'
#1
file
#1
Each
record in the address file
is
divided into four fields. Field
#1
contains
the name; field
#2
the street address; field
#3
the city and state; and field
#4
the
telephone number.
Gloria
Arnold
777
Greenfield
456-7890
Hayward.
CA
--
-
~
field
#1
}
field
#2
#3
record
#3
field
field
#4
To get
to
a field, the file
and
record numbers must
be
accessed first. In other
words, to find out in
what
city Gloria Arnold resides, File
#1
and Record
#2
must
be
referenced first before Field
#3
may
be
accessed. This structuring
is
very
im-
portant because
it
enables large quantities of data to
be
separated into smaller
units, making
it
more organized and more easily accessible.
The
PET
uses
two
types of files: program files and data files.
238

Table of Contents

Related product manuals