[<<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()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson