Reads characters from the receiving buffer
<nComPort> Designates the port (1 to N) that is read.
<nLength> Designates the number of the characters in the buffer
that are read. The default value reads all characters.
<lNoDelete> Designates whether or not characters are removed from
the buffer as they are read. The default setting removes all characters
from the buffer as they are read. However, if the parameter is .T., the
characters remain in the buffer as long as it is not full.
The returned string contains the corresponding characters from the
All characters arriving at the serial port are stored in the appropriate
buffer under interrupt control. It is possible to determine the number
of characters in the buffer and to read one, several, or all of the
characters. If the <nLength> parameter is not specified, then all the
characters in the buffer are read.
” Remember that you can receive additional characters between
calling COM_COUNT() and COM_READ().
Wait until at least 10 characters have been received:
DO WHILE COM_COUNT(1) < 10 // Wait until 10
// characters in buffer
cInput := COM_READ(1, 10) // Read in 10 characters
? cInput // Display characters
// that are read