Serial Line I/O

Support for serial line devices was added to fconfigure. The -mode argument specifies the baud rate, parity setting, and the number of data and stop bits. The -mode option to fconfigure is described on page 224.

Windows has some special device names that always connect you to the serial line devices when you use open. They are com1 and com2. UNIX has names for serial devices in /dev. Interactive applications can open the current terminal with /dev/tty.

As of this writing there is no way to open serial devices on the Macintosh. I expect a new serial command for this purpose, or possibly a flag to open.

Get Practical Programming in Tcl & Tk, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.