Specifications

Commands - 54
INKEY$
Function
SYNTAX: a$ = INKEY$(n)
PURPOSE: To return a single character from a serial input buffer.
REMARKS: The returned value is a null or one–character–length string.
n = legal serial port number.
As long as there are characters in the input serial buffer, you may bring them out one at a time. Each
time INKEY$ is executed, a character is erased from the buffer.
RELATED: COM$, INPUT
EXAMPLE: 10 A$ = INKEY$(1)
20 IF A$ = "" THEN 10
30 IF A$ = "Y" THEN PRINT "YES"
40 IF A$ = "N" THEN PRINT "NO"
50 GOTO 10
ERROR: <Illegal argument> – if n is not a legal port number
<Data negative> – for n