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_flush()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
COM_FLUSH()

Syntax:     COM_FLUSH(<port>)

Arguments:  <port> denotes the interface for which the buffer will be
            erased, COM1: (1) or COM2: (2).

Returns:    A logical value.
            The function will return the value (.T.) if the buffer has been
            erased successfully.

Usage:      This function can be used to reject all the characters in the
            data buffer in a very simple manner.  It is, therefore, not
            necessary to determine the number of characters in the buffer
            and to then remove them via the read process.  COM_FLUSH()
            will also guarantee a completely empty buffer at the time of
            the execution.  Also, it is possible to receive new characters
            between the execution of  a COM_COUNT() and a COM_READ().

Note:       COM_FLUSH() on a unopened interface will be ineffective.

Library:    CT1.LIB


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

Examples:   hayes = "AZT"               && Hayes command for
                                        && modem reset

            COM_SEND(1,hayes)           && Issue Hayes command
            INKEY(1)                    && Wait 1 second
            COM_FLUSH(1)                && Reject reply messages
                                        && of the modem.


See Also: COM_COUNT() COM_READ()

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