
|
COM_COUNT()
Counts the number of characters in the input buffer
Syntax
COM_COUNT(<nComPort>) --> nTotalCharacters
Argument
<nComPort> Designates the port (1 to N) for which the number of
characters in the input buffer is determined.
Returns
COM_COUNT() returns the number of characters in the selected buffer.
Description
This function allows you to determine the number of characters in one of
the four possible buffers. This lets you determine how many characters
can be read with the COM_READ() function.
Note
” If an attempt is made to read the number of characters
available in a closed port, the function returns a value of -1.
Example
nCharacter := COM_COUNT(1) // Number of characters-port 1
IF nCharacter > 0
COM_READ(1, 1) // Read 1 character
ENDIF
See Also:
COM_OPEN()
COM_READ()
|