Tandy 1000 Basic Reference Manual page 171

Hide thumbs Also See for 1000:
Table of Contents

Advertisement

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
t o
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
1 0 OPEN "CUM1
: "
A S 1
2 0 F I E L D 1 , 8 A S A $
3 0 OPEN " R " , 2 , " F I L E " , 8
4 0 F I E L D 2 , 8 A S
E$
5 0 1 = 1
6 0 GET 1 , 8
7 0 P R I N T " C O M M U N I C A T I O N S
B U F F E R C A S )
= " ; A $
8 0 L S E T E $ = & $
9 0 P R I N T "NOW F I L E B U F F E R
< E $ )
C O N T A I N S :
" ; E $
1 0 0 P U T
2 , 1
1 1 0
I
=
I
+
1
1 2 0 I F I N K E Y $
< >
"a"
THEN GOT0 6 0
1 3 0 CLOSE
This program gets data from Communications Channel 1 and
places
it
in the communications buffer.
169

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents