246
User's
Handbook
to
the
Atari 400/ 800
Computers
all files with
an
extension
of
.BAS
would
be
returned
during
a read
operation.
8 Disk
write
operation. The file
pointer
is
positioned
to
the
beginning
of
the file.
Any existing data in the file
is
erased.
9 Disk
write
append
operation
. The file
pointer
is
positioned
to
the end
of
the
file. The file must already exist
or
error
170
will
occur. The append
operation
allows data to be added to
an
existing
file.
12 Disk read and
write
operation.
The file
pointer
is
positioned
to
the
beginning
of
the file, and existing data in the file
is
not
altered. The file must already exist
before
it
can be
opened
for
updating.
As
data
is
read
or
written
, the file
pointer
will be moved
forward
in the file. Data
written
to the file
will
replace existing
data.
A
file must be
opened
via
the
OPEN
statement
before
that file
can be referenced in a program.
Once
a
file
has
been
opened
,
it
is
referenced
with
its channel
number,
not
with
its filename.
Channels
1
to
5 are always available
for
use
in Atari BASIC
programs.
Channel 0
is
reserved
for
the
editor
(E
:). The BASIC
graphics statements
use
channel
6.
The
CLOAD
,
CSAVE
, and
LPRINT statements
use
channel 7.
As
long
as
the BASIC program
does
not
use
the graphics statements, channel 6 will be available
for
use
. If
CLOAD,
CSAVE
, and
LPRI
NT are
not
used, channel 7
will be available.
Closing a Data File
Once
a
program
has
finished accessing
an
open
file
, that file
should be closed
with
the
CLOSE
statement. This allows that file's