EasyManua.ls Logo

Commodore 1541-II - File Limits; Creating a Relative File

Commodore 1541-II
104 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...
desired
person
out
of
a
thousand
in
under
15
seconds,
a
feat
no
sequential
file
program
could
match.
FILE
LIMITS
One
of
the
nicest
aspects
of
relative
files
is
that
all
this
is
done
for
you
without
your
having
to
worry
at
all
about
exactly
where
on
the
diskette's
surface
a
given
record
will
be
stored,
or
whether
it
will
fit
properly
within
the^current
disk
sector,
or
need
to
be
extended
onto
the
next
available
sector.
DOS
takes
care
of
all
that
for
you.
All
you
need
to
do
is
specify
how
long
each
record
is,
in
bytes,
and
how
many
records
you
will
need.
DOS
will
do
the
rest,
and
organize
things
in
such
a
way
that
it
can
quickly
find
any
record
in
the
file,
as
soon
as
it
is
given
its
record
number
(ordinal
position
within
the
file).
The
only
limit
that
will
concern
you,
is
that
each
record
must
be
the
same
size,
and
the
record
length
you
choose
must
be
between
2
and
254
characters.
Naturally
the
entire
file
also
has
to
fit
on
your
diskette
too,
which
means
that
the
more
records
you
need,
the
shorter
each
must
be.
CREATING
A
RELATIVE
FILE
When
a
relative
file
is
to
be
used
for
the
first
time,
its
Open
statement
will
create
the
file;
after
that,
the
same
Open
statement
will
be used
to
reopen
the
file
for
both
reading
and
writing.
FORMAT
STATEMENT
TO
OPEN
A
RELATIVE
FILE:
OPEN
file
#,
device
#,
channel
#,
"drive
#:
file
name,
L,"
+
CHR$
(record
length)
where
"file
#"
is
the
file
number,
normally
an
integer
between
1
and
127;
"device
#"
is
the
device
number
to
be
used,
normally
8
on
the
1541;
"channel
#"
selects
a
particular
channel
along
which
communications
for
this
file
can
take
place,
normally
between
2
and
14;
"drive
#"
is
the
drive
number,
always
0
on
the
1541;
and
"file
name'*
is
the
file
name,
with a
maximum
length
of
16
characters.
Pattern
matching
characters
are
allowed
in
the
name
when
accessing
an
existing
file,
but
not
when
creating
a
new
one.
The
"record
length"
is
the
size
of
each
record
within
the
file
in
bytes
used,
including
carriage
returns,
quotation
marks
and
other
special
characters.
56

Table of Contents

Related product manuals