CLOSE
CLOSE
#file'number1
:DELETEI
The
CLOSE
statement
"closes" or discontinues the aSSOClatlon
between
a file
and
a program. After the
CLOSE
statement
is
performed,
the
"closed" file is not available to your
program
unless
you
OPEN
it again, Also, the
computer
will no longer associate the
closed file with the file-number you specified
in
the program.
You
can
then
assign
that
particular
file-number to any file you wish.
If
you use the
DELETE
option in
the
CLOSE
statement,
the
action performed
depends
on
the device used. As additional
accessulY
uevices
uecol1le
available.
their
accompanying
manuals
will describe
the
DELETE
option.
If
you
attempt
to
CLOSE
a file
thM
you
havt-~
not opened previously
in your
program,
the
computer
will
terminate
your
program
with
the
"FILE
ERROR"
message.
In
order
to
safeguard
your files. the
computer
will automatically
close any
open
files should
an
error
occur
which
terminates
your
program.
If
a
break
occurs
in your
program.
either
by a
BREAK
command
or your
pressing
CLEAR,
open files
are
automatically
closed
only
if
one
of
the following occurs:
•
you
edit
the
program
• you
terminate
BASIC with the
BYE
command
• you
RUN
the
program
again
• you
enter
aNEW
command
If
you use
QUIT
to leave your
program.
the
computer
will
NOT
close
any
open
fiks
and
you
could
lose
the
data
on
these
files.
If
you need
to
exit
from your file-processing
program
before its
normal end, follow these
directions
so
that
you wOll't lose any data:
•
Press
CLEAR
untIl the
computer
reacts
with
"BREAKPOINT
AT xx."
This
may
take
several
seconds.
•
Enter
BYE
when the
cursor
reappears
all the screen.
User's
Reference
Guide
Examples:
>NEW
>100
OPEN
116:"cS1",SEQUENT1AL
,INTERNAL,INPuT,rIxcD
>110
OPEN
1125:"CS2",SEQUENTIA
L,INTERNAL,OUTPUT,FIXED
• p
[.
u 9
ram
L i
Ii
e s
>200
CLOSE
116:DELETE
>210
CLOSE
1125
>220
CND
!l-123