Purpose |
Send a "line" of binary data through a serial port with optional CR/LF ($CRLF) termination. |
Syntax |
COMM PRINT [#] hComm, string_expression [;] |
Remarks |
Places a copy of the data in string_expression into the transmit buffer to be sent to the serial port, followed by a carriage return and linefeed pair (CHR$(13,10) or $CRLF), unless a trailing semicolon is employed. This is a variation of COMM SEND and is intended as a convenience for transmitting text data. The Number symbol (#) prefix is optional, but recommended for the purposes of clarity. COMM PRINT is ideal for sending "AT" commands to a modem. Omit the trailing semicolon for this purpose, since you would want the CR/LF to be send along with the data. |
Restrictions |
Avoid using ASCIIZ strings to hold binary data, as any embedded CHR$(0) or $NUL characters will be misunderstood as indicating the end of the string. |
See also |
Serial Communications, COMM CLOSE, COMM function, COMM LINE, COMM OPEN, COMM RECV, COMM RESET, COMM SEND, COMM SET |