stringVar$ = inkey$(deviceID)
This function reads a single character from an open serial port or an open file, and returns it as a 1-character string.
deviceID should equal either
_printerPort (see the
open "C" statement), or should be the
fileID number of an open file (see the open statement).
The function returns an empty (zero-length) string in the following situations:
- There are no characters currently in the input buffer of the specified serial port
- The end of the specified file has been reached.
This function is similar to the
read# deviceID, stringVar$;1 statement. However, the
read# statement generates an error if you attempt to read past the end of a file.
inkey$; read#; open; open "C"