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

Syntax:     COM_SOFT_R(<port>[,<expL>])

Arguments:  <port> denotes the interface for which the XOFF receive flag
            is to be tested, COM1: (1) or COM2: (2).
            <expL> indicates whether  it is required to set the flag (.T.)
            or reset the flag (.F.).

Returns:    A logical value.
            This function will return a (.T.) if an XOFF symbol (Ctrl-S)
            has been received since the interface was last queried or
            opened, but no subsequent XON symbol (Ctrl-Q) has yet
            been received.

Usage:      If software handshaking is switched on, then the receipt of
            an XOFF character is recorded in an internal flag.  This flag
            can be determined via COMM_SOFT_R().  The flag will be
            reset when an XON symbol is received.  It is possible for the
            internal flag to be reset via the second argument.  This is
            necessary, as it is possible that in several situations the
            distant station will not transmit an XON character.

Note:       Relatively small strings are best transmitted via
            COM_SEND(), since it is not required to note any incoming
            XOFF.  COM_SOFT_R() can then be checked as it is
            transmitted.

Library:    CT1.LIB


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

Examples:   COM_OPEN(1,1000)

            * Transmit until an XOFF is detected.
            pos = 1

            DO WHILE .NOT. COM_SOFT_R() .AND. pos <= LEN(string)
               COM_SEND(1,SUBSTR(string,pos,1))
               pos = pos + 1
            ENDDO



See Also: COM_SEND() COM_SOFT()

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