[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
COM_CLOSE()
Clears the receiving buffer and closes the com port
------------------------------------------------------------------------------
Syntax
COM_CLOSE(<nComPort>) --> lClosed
Argument
<nComPort> Designates which port is closed, COM1(1) to COM4(4).
Returns
A return of .T. indicates that the port is open and can be closed
successfully.
Description
This function closes one of the ports (1 to 4). This means that the
buffer is cleared, and all signals in the modem control register (MCR)
are deactivated. Characters remaining in the buffer are lost. The DTR
and RTS signals become inactive, and any existing modem connection is
broken.
Note
Warning! All characters in the buffer are cleared, and the status
register is set to 0. Existing connections are always broken!
Example
nCharacter := COM_COUNT(1) // How many characters in
// the buffer ?
IF nCharacter > 0
* Read everything from buffer!
cContent := COM_READ(1, nCharacter)
ENDIF
COM_CLOSE(1)
See Also:
COM_OPEN()
COM_INIT()
COM_DTR()
COM_RTS()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson