Google

 COM_READ()
 Reads characters from the receiving buffer

Syntax COM_READ(<nComPort>,[<nLength>],[<lNoDelete>]) --> cCharacterstring Arguments <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. Returns The returned string contains the corresponding characters from the receiving buffer. Description 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. Note Remember that you can receive additional characters between calling COM_COUNT() and COM_READ(). Example Wait until at least 10 characters have been received: DO WHILE COM_COUNT(1) < 10 // Wait until 10 // characters in buffer *... ENDDO cInput := COM_READ(1, 10) // Read in 10 characters ? cInput // Display characters // that are read

See Also: COM_COUNT()