Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>com_flush()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 COM_FLUSH()
 Clears the receiving buffer
------------------------------------------------------------------------------
 Syntax

     COM_FLUSH(<nComPort>) --> lClear

 Argument

     <nComPort>  Designates the port (1 to 4) for which the receiving
     buffer is cleared.

 Returns

     If the receiving buffer can be cleared successfully, the function
     returns .T..

 Description

     This function allows you to flush all the characters in a receiving
     buffer.  This makes it unnecessary to tediously determine how many
     characters are currently in the buffer in order to remove them with a
     read procedure.

     COM_FLUSH() guarantees a truly empty buffer.  However, a new character
     can be received between the time that you call a COM_COUNT() and a
     COM_READ().

 Note

     .  A COM_FLUSH() on an unopened port is ineffective.

 Example

     cHayes  :=  "ATZ"           // Hayes modem reset command
     COM_SEND(1, cHayes)         // Issue Hayes command
     INKEY(1)                    // Wait one second
     COM_FLUSH(1)                // Reject modem reply messages


See Also: COM_COUNT() COM_READ()

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