PI1X Basic Programming Manual Ver. 1.10
116/156
IF A$<>"" THEN
IF(ASC(A$)=27) THEN
EXIT
ELSE
AA%=LINKPORT_WRITE(1,A$,1)
IF AA%>0 THEN PRINT A$;
END IF
END IF
END IF
STR1$=LINKPORT_READ$(1,1)
IF LEN(STR1$)<>0 THEN
PRINT STR1$;
END IF
WEND
…
A%=LINKPORT_CLOSE(1)
…
Description
:
After opening LinkingPort, you can read characters from that
LinkingPort.
A$
is a string variable to be assigned the characters is read from
that LinkingPort.
N1%
is an integer variable indicating LinkingPort’s port number.
The value is form 1 to 4.
N2%
is an integer variable indicating number of bytes to be read
from LinkingPort.
Purpose
:
New read characters from LinkingPort.
Syntax
:
A$=LINKPORT_READ_N$(N1%,N2%)
Example
:
A%=LINKPORT_OPEN
…
WHILE 1
A$=INKEY$
IF A$<>"" THEN
IF(ASC(A$)=27) THEN
EXIT
ELSE
AA%=LINKPORT_WRITE_N(1,A$,1)
IF AA%>0 THEN PRINT A$;