EasyManua.ls Logo

Commodore PET - BASIC Statements; Close

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...
BASIC STATEMENTS
CLOSE
The
CLOSE
statement closes a logical file.
Format:
CLOSE
file
where:
file
is
the logical file number
that
was given
when
the file was opened.
Each file should
be
ciosed when
Vou
are through accessing it. Since the
PET
allows only ten files to
be
open at a time.
it
is
good practice to close files
as
soon
as
they are
not
in use to allow other files
to
be
opened. A logical file may
be
closed only once between file open commands.
Ail
open files
must
be
closed
before a program
END.
tiOLD
ITI
You
CA""T
OPEN
"THAT
UNTIL
Yov
Cl.OSE.
ONE OF
THESE.
F1L~S.
The particular operations performed in response
to
a
CLOSE
statement de-
pend on the physical device and the type of operation for
which
the file was
opened. For
PET
cassette tapes. closing a file after reading it
will
stop the
PET
from reading the file any further. Closing a file after
writing
to it
is
critical: the
PET
puts
an
end-of-file mark at
that
point.
an
end-of-tape mark for
write
code
2.
and
finishes
writing
the last of the buffer contents onto tape.
723

Table of Contents

Related product manuals