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

Syntax:     COM_SEND(<port>,<expC>)

Arguments:  <port> denotes on which interface to transmit, COM1: (1) or
            COM2: (2).
            <expC> denotes the character or string to be transmitted.
            This second argument can also be numerical.  If the
            requirement is to transmit a single character only, the ASCII
            code is assumed.

Returns:    A numeric value.
            0 is returned if the transmission was successful.  Otherwise
            the number of characters not yet transmitted is returned.

Usage:      This function is intended to transmit one, or several
            characters to one of the two interfaces.  There is no
            outgoing transmission buffer, hence, control will only be
            returned to the Clipper program when all characters have
            been, or no more characters can be, transmitted.  If a value
            greater than 0 is returned, then an error has occurred and
            the value corresponds to the number of characters
            unsuccessfully sent.  Any transmission will be cut off
            Immediately if the distant station deactivates the CTS signal.
            COM_SEND() will be terminated so that the Clipper program
            will not be "suspended," and a numerical value, which
            corresponds to the number of symbols not yet
            transmitted, will be returned.

Note:       Software handshake is not supported, i.e., incoming XOFF
            will have no effect.  It is therefore recommended to transmit
            in small packets and to regularly query COM_SOFT_R().

Library:    CT1.LIB


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

Examples:   COM_HARD(.T.)                       && Handshake will be
                                                && considered.

            ACCEPT "Please type in name -->" TO input


            rest = COM_SEND(1,input)            && 1. Request to send

            DO WHILE rest > 0
               input = RIGHT(input,rest)        && Symbols not
                                                && transmitted

               rest = COM_SEND(1,input)
            ENDDO



See Also: COM_HARD() COM_INIT() COM_OPEN() COM_SOFT_R()

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