PORTOPEN

Synopsis
PORTOPEN port 
Description

Gives you access to the serial and parallel ports of your computer. The port input is a string that is the name of the port you wish to open (for example, COM1-COM4 and LPT1-LPT3).

Once the desired port is open you can read from it with PORTREADCHAR or PORTREADARRAY, or you can write to it with PORTWRITECHAR or PORTWRITEARRAY. You can set the characteristics of the port with PORTMODE. Only one port can be open at any given time. When you have finished with the port, you should close it with PORTCLOSE.

Do not confuse PORTOPEN with INPORT and OUTPORT, which are for "hardware" port communications.

Example
PORTOPEN "com1
PORTCLOSE

SourceForge.net Logo