
23-12 XL-BASIC Programming Guide XL™ SERIES
--- Com Port Commands —
OPENCOM1 Turn on the RS232 drivers for com port 1, initialize I/O buffers making it
available for the ‘print’ and ‘input’ commands.
CLOSECOM1 Turn off the RS232 drivers for com port 1.
FLUSHCOM1 Clear out the input buffer for Com 1.
OPENCOM2 Turn on the RS232 drivers for com port 2 and enable it to work with the
print2 command.
CLOSECOM2 Turn off the RS232 drivers for com port 2.
FLUSHCOM2 Clear out the input buffer for Com 2.
OPENCOM3 Turn on the RS232 drivers for com port 3 and enable it to work with the
print3 command.
CLOSECOM3 Turn off the RS232 drivers for com port 3.
FLUSHCOM3 Clear out the input buffer for Com 3.
PRINT Print text or data to the standard output which is com port 1. Any text
listed between quotes will be sent directly to the serial port.
Example: print “this is a test”
This sends the test message out the serial port and terminates the message
with a carriage return and a line feed. To suppress the carriage return and
line feed use a comma ‘,’ at the end of the message.
Example: print “this is a test”,
Data may also be printed on the same line using the comma ‘,’or the
semicolon ‘;’ as follows:
Example: print “stage = “,stage rem line 1
print “stage = “,stage,” temp = “,PtTemp rem line 2
print “stage = “;stage,” temp = “,PtTemp, rem line 3
The first line is terminated with the carriage return line feed. This is
because there is no comma or semicolon formatting character after the
variable stage.
Kommentare zu diesen Handbüchern