Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Clipper Tools One Guide - <b>com_count()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
COM_COUNT()

Syntax:     COM_COUNT(<port>)

Arguments:  <port> indicate the serial interface for which the number of
            characters in the buffer will be determined.  COM1: (1) or
            COM2: (2).

Returns:    A numeric value.
            Number of characters in the buffer selected.

Usage:      You may need to process information in packets (say 10
            bytes) rather than build up the packet yourself.  It is also
            possible to let the buffer build up the packet, and then pull
            the whole packet into your program.

Note:       This function will return the value -1 if an attempt is made to
            read the number of characters ready at a closed interface.

Library:    CT1.LIB


--------------------------------- Example ------------------------------

Examples:   symbol = COM_COUNT(1)       && Number of symbols
                                        && for port 1

            IF symbol > 0
               COM_READ(1,1)            && read in 1 symbol
            ENDIF



See Also: COM_OPEN() COM_READ()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson