User`s guide
98
CipherLab BASIC Compiler
User's Guide
READ_COM$
Purpose
To read data from a specified communication port.
Syntax
A$ = READ_COM$(N%)
Remarks
"A$" is a string variable to be assigned to the data.
"N%" is an integer variable, indicating from which communication port the data is
to be read. If the buffer of the communication port is empty, an empty string will be
returned.
Example
ON COM(1) GOSUB HostCommand
...
HostCommand:
Cmd$ = READ_COM$(1)
CmdIdentifier$ = LEFT$(Cmd$,1)
DBFNum% = VAL(MID$(Cmd$,2,1))
IDFNum% = VAL(MID$(Cmd$,3,1))
CardID$ = RIGHT$(Cmd$,LEN(Cmd$)-3)
IF CmdIdentifier$ = "-" THEN
DEL_RECORD(DBFNum%,IDFNum%)
ELSE
...
See Also
CLOSE_COM, OFF COM, ON COM GOSUB…, OPEN_COM,
SET_COM_TYPE, WRITE_COM
SET_COM_TYPE
Purpose
To assign the communication type to a specified COM port.
Syntax
SET_COM_TYPE(N%, type%)
Remarks
"N%" is an integer variable, indicating which communication port is to be set.
"type%" is an integer variable, indicating the type of interface.
Value (type%) Meaning
1
2
3
Direct RS-232
N/A
Serial IR (via IR transceiver)