Basic
OPEN
mode,[#]buffer,~athname][dev:][,record
length]
OPEN
bathname][dev:]
[FOR
mode]
AS
[#]buffer
[LEN
=
record length]
Establishes an input/output path for
a
file or device.
Buffer
specifies the I/O buffer in memory to use when accessing the
file and may be in the range
1
to 15. The number sign
(#)
is not
required.
If
you do not specify
pathname,
you must specify
dev:.
Record length
sets the record length for direct access files and may
be in the range
1
to 32768. Default
=
128 bytes.
Mode
specifies any of the following:
0
or OUTPUT
I
or INPUT
A or APPEND
R or RANDOM
sequential output mode
sequential input mode
sequential output and extend mode
direct inputloutput mode
In the first form of the syntax, you must use the abbreviated form
of
mode
and enclose it in quotation marks.
In the second form of the syntax, you must specify the complete word
for
mode.
You may not specify RANDOM. If you want to use direct
access in the second form of the syntax, omit
mode.
OPEN "R",2,"TEST. DAT"
OPEN "LPTI
:Ir
FOR OUTPUT AS
#2
OPE N
'
'
C
OMc
hannel
:
[speed] [,parity]
[
,
data][, stop][
,
R
SI
[,CS[seconds]][,DS[seconds]]
[,CD[seconds]][,mode][,LF]" AS
[#]buffer
[LEN
=
number]
Opens
a
file and allocates a buffer for RS-232C (Asynchronous Com-
munications Adapter) communication.
Channel
specifies communications channel
1
or
2.
Speed
specifies the baud rate and may be 75,110,150,300,600,1200,
1800, 2400, 4800, or 9600. Default
=
300.
Parity
may be E for EVEN,
0
for ODD, M for MARK,
S
for SPACE,
or N for NO. Default
=
E (EVEN).
Tandy
1000
49