Chapter
10
1
BASIC
Keywords
GET/C
ommunic a
t
ions
Statement
GET
[#I
buffer,number
Transfers data from the communications line to the communica-
tions buffer.
Buffer
must be the same
buffer
assigned
to
the file when it was
opened. The number
sign
(#)
is
optional.
It
is provided for com-
patibility with other BASICs.
Number
is
the number of bytes to transfer.
Number
cannot ex-
ceed the value used in the LEN option of the OPEN COM
statement.
Note:
Because of the low performance associated with
telephone line communications, we recommend that
you
not
use GET and PUT statements in such appli-
cations. Instead, use the other disk 110 statements.
Sample
Program
10
OPEN
"CUM1
:"
AS
1
20
FIELD
1,
8
AS
A$
30
OPEN
"R"
,2,
"F
I
LE",
8
40
FIELD
2,
8
AS
E$
501=1
60
GET
1
,8
70
PRINT "COMMUNICATIONS BUFFER
CAS)
=";A$
80
LSET E$=&$
90
PRINT "NOW FILE BUFFER
<E$)
CONTAINS: ";E$
100
PUT
2,1
110
I
=
I
+
1
120
IF INKEY$
<>
"a"
THEN GOT0
60
130
CLOSE
This program gets data from Communications Channel
1
and
places
it
in the communications buffer.
169