EasyManua.ls Logo

Radio Shack TRS-80 Model 4 - Page 261

Radio Shack TRS-80 Model 4
418 pages
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...
OPEN
Statement
OPEN mode, buffer, "filespec" [,record length]
Opens a disk file.
Mode
is
a string expression whose first character
is
one of the
following:
o for sequential output mode
I for sequential input mode
E for sequential output
and
extend mode
o or R for direct input/output mode
Buffer is
an
integer between 1 and
15.
It
specifies which area
in
memory you will use to access the file.
Filespec specifies a TRSDOS file.
Record length is
an
integer which sets the record length for
direct-access files. The default
is
256 bytes.
Once you have assigned a buffer to a file with the OPEN statement,
that buffer cannot be used
in
another OPEN statement. You must first
CLOSE the first file.
Examples
OPEN
"0",2,
"DATA/BAS.SPECIAL"
opens the file DATA/BAS
in
direct-access mode, with the password
SPECIAL. Buffer 2 is used. If DATA/BAS does not exist, it
is
created
on
the first non write-protected drive. The record length is 256 bytes.
OPEN
"0",
5,
"TE){T/BAS",
64
opens the file TEXT/BAS for direct access. Buffer 5 is used. The
record length
is
64.
If
this length does not match the record length
assigned to TEXT/BAS when the file was originally OPENed,
an
error
occurs.
OPEN
"0",
7,
"IN\.J/CoNT"
opens the sequential file "INV/CONT" for output.
If
"INV/CONT" does
not exist, it is created. Information is written to the file sequentially,
starting at the first byte. If the file does exist, any new information is
written over the existing information; the file's previous contents are
lost.
2-135

Other manuals for Radio Shack TRS-80 Model 4

Related product manuals