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_sflush()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 COM_SFLUSH()
 Deletes the sending background buffer
------------------------------------------------------------------------------
 Syntax

     COM_SFLUSH(<nComPort>) --> lDeleted

 Argument

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

 Returns

     If the selected sending buffer is successfully deleted, the function
     returns a .T.

 Description

     COM_SFLUSH() eliminates all the characters in a sending buffer.  This
     can be useful when the send routine has been futilely waiting for an XON
     character (bad software handshake).

 Notes

     .  A COM_SFLUSH() to a closed port does not work.

     .  It is not necessary to test for characters in the sending
        buffer to carry out a COM_SFLUSH().

 Example

     When the sending buffer is waiting for an XON character and the
     transmission has been delayed 30 seconds, the sending buffer is deleted:

     nStart  := SECONDS()                    // When sent

     COM_SEND(2, cSendText)

     IF ISBIT(COM_SMODE(2), 2)               // Waiting for XON?
        IF SECONDS() - nStart > 30           // 30 second delay ...
           COM_SFLUSH(2)                     // Delete sending buffer
        ENDIF
     ENDIF


See Also: COM_SCOUNT() COM_SMODE()

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