COMM SEND statement

Purpose | Send a string of data through a serial port.
Syntax | COMM SEND [#] hComm, string_expression TO [CharCountVar]
Remarks | The data contained in string_expression is sent to the serial port associated with the file number hComm. The number symbol (#) is optional. The data is sent in the character form specified in the COMM OPEN statement. If CHR=WIDE was given, the data is sent in wide Unicode characters. Otherwise, it is sent in ANSI bytes. The data will be converted to the appropriate form automatically. With COMM SEND, no delimiters are added to the data. If a trailing CR/LF is needed, it's usually best to use COMM PRINT instead. If the optional "TO CharCountVar" clause is included, a count of the number of characters written is assigned to it. This will allow you to gauge the success of the operation. If a TimeOut occurred, this value will be less than expected, and a run-time error 24 (Device Timeout) will be generated.
See also | Serial Communications, COMM CLOSE, COMM function, COMM LINE, COMM OPEN, COMM PRINT, COMM RECV, COMM RESET, COMM SET, COMM TIMEOUT
Example | A$ = "ATDT1,555-1234;" COMM SEND #hComm, a$