Always close a file after working with it. You are not allowed to have more than
ten open files in the computer and five in the disk drives, so it is prudent to
make a habit of closing files as soon as possible. This way you will always have
the maximum number of files available for use.
The DCLOSE command is available only to BASIC 4.0 users. This command
closes files opened with the DOPEN command.
The format for DCLOSE is:
Where:
The DCLOSE command may also be used in this format:
Where:
When used in this form, DCLOSE command closes all active disk files on the
specified unit.
The following examples illustrate some applications of DCLOSE command:
Example 1:
Example 2:
Closing the command channel closes all channels associated with the disk drive.
No other part of the logical file environment is affected. That is, the computer
does not recognize that the files have been closed.
The following example illustrates a situation in which several channels are
closed down by a single CLOSE command.
DCLOSE#lfn
lfn = the logical file number of the file to be closed.
DCLOSE ONUdn
dn = the device number of the disk unit (defaults to 8).
DCLOSE
Close all files currently OPEN.
DCLOSE#5
Close only logical file 5.
CLOSING THE COMMAND CHANNEL
DCLOSE
33