Write data to the communications device file for sending.
The PRINT# statement writes the specified data to the communications device file for transmission--a command to a printer, for example.
Adding a semicolon to the PRINT statement suppresses the automatic carriage return normally added to the output.
Output control | Output character | ||||
---|---|---|---|---|---|
;(semicolon) |
Suppress the automatic carriage return.
|
||||
Blank |
Add CR-LF pair.
|
Set fileno to the value specified when opening the communications device file.
Send the sequence "123456789", CR, LF via the CU
open "COM1:115200" as #1 print #1, "1234567890" close #1
Send the sequence ESC (1Bh), "M", LF (0Ah), NUL (00h) via the connector
const ESC = chr$(&h1B) ' define control codes const LF = chr$(&h0A) const NUL = chr$(&h00) open "COM2:115200" as #1 print #1, ESC;"M";LF;NUL; close #1
If you have not registered
The services on this member site are available only for registered customers.