Dopen; Close - Commodore 2031 User Manual

Hide thumbs Also See for 2031:
Table of Contents

Advertisement

The contents of an existing file may be replaced by preceding the drive number
with an at sign (@) in the OPEN command.
If the specified file does not exist, then normal OPENing procedures are
illustrated in these examples:
Example 1:
Example 2:
The preceding methods are convenient when it is necessary to open several
channels to the same file name.

DOPEN

The DOPEN command is available only to BASIC 4.0 users. DOPEN may be
used to create relative files or sequential files of fixed length.
The format of DOPEN is:
DOPEN#lfn,"fn",Ddr,Lrl,(,ONUdn)(,W)
Where:
W may be specified to mean write mode. If W is not specified for
sequential files, the file will be opened to read.

CLOSE

The CLOSE command closes a file opened by the OPEN comand. Its format
is:
Where:
32
OPEN3,8,5,"@0:JDATA,USR,WRITE"
FL$="0:FILEA,SEQ,READ"
OPEN1,8,14,FL$
FL$="0:FILEA"
OPEN1,8,14,FL$+",SEQ,WRITE"
lfn, fn, and dr are the same as defined for OPEN.
Lrl defines the record length as equal to rl (relative files
only)
ONUdn specifies the device number equal to dn (with default
device being 8)
CLOSE lfn
lfn = the logical file number of a file opened by the OPEN com-
mand.

Advertisement

Table of Contents
loading

Table of Contents