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

Syntax:     COM_CLOSE(<port>)

Arguments:  <port> indicates  which serial interface to close, COM1: (1) or
            COM2: (2).

Returns:    A logical value.
            A (.T.) means the interface which was open, has been closed
            successfully.

Usage:      This function can close either COM1: or COM2:.  When this
            happens the buffer is closed, and all signals in the modem
            control register (MCR) are deactivated.  Characters remaining
            in the buffer will be lost.  The DTR and RTS signals will
            become active, and any modem connection will be broken.

Note:       All characters in the buffer will be erased, the status register
            will be set to 0 and any existing connections will be
            disconnected.

Library:    CT1.LIB


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

Examples:   symbol = COM_COUNT()        && How many symbols in
                                        && buffer.

            IF symbol > 0
               * Read everything in the buffer
               contents = COM_READ(1,symbol)
            ENDIF

            COM_CLOSE(1)



See Also: COM_DTR() COM_INIT() COM_OPEN() COM_RTS()

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