$FUNCNAME$
	COM_COUNT()
$CATEGORY$
  Serial I/O
$SUMMARY$
	Counts the number of characters in the input buffer.
$LANG_RU$
	      .
$SYNTAX$
	COM_COUNT(<nComPort>) --> nTotalCharacters
$ARGUMENTS$
	<nComPort> - Designates the port (1 to N) for which the number of characters in the input buffer is determined.
$LANG_RU$
	<nComPort> -   .
$RETURNS$
	Return the number of characters in the selected buffer.
$LANG_RU$
	      .
$DESCRIPTION$
	This function allows you to determine the number of characters
	in recieve buffer. This lets you determine how many characters can be
	read with the COM_READ() function.

	If an attempt is made to read the number of characters available
	in a closed port, the function returns a value of -1.
$LANG_RU$
	        
	.   ,     
	 COM_READ().

	     ,  -1.
$EXAMPLES$
	nCharacter  :=  COM_COUNT(1)   // Number of characters-port 1
	IF nCharacter > 0
	     COM_READ(1, 1)              // Read 1 character
	ENDIF
$PECULIARITIES$
$LANG_RU$
$PLATFORMS$
   No dependies of platform.
   $LANG_RU$
      
$SEEALSO$
	COM_DTR(),COM_RTS(),COM_SOFT(),COM_TIMEOUT(),COM_HARD(),COM_NUM()
$AUTHOR$
ITK,Paul
$END$

