COMM CLOSE statement

Purpose | Close an open serial port.
Syntax | COMM CLOSE [#] hComm [, [#] hComm ...]
Remarks | Closes one or more communication ports, as specified by the PowerBASIC file number held in each hComm parameter. COMM CLOSE ends the relationship between a PowerBASIC file number, and the serial port device that was previously associated with it by the COMM OPEN statement. The Number symbol (#) prefix is optional, but recommended for the purposes of clarity. It is also recommended that you explicitly close any serial port that you have opened before your application terminates. Note that COMM CLOSE is a synonym for CLOSE.
See also | Serial Communications, CLOSE, COMM function, COMM LINE, COMM OPEN, COMM PRINT, COMM RECV, COMM RESET, COMM SEND, COMM SET, COMM TIMEOUT
Example | COMM CLOSE #hComm, 5 ' Close hComm and file number 5