CONNECT and DISCONNECT may be used to direct terminal I/O to a specific line.
Format
CONNECT line.no THEN/ELSE ... DISCONNECT THEN/ELSE ... |
Description
The user may connect to another line providing that line is currently logged off, that no one else is currently connected to that line, and that the process was not already connected to a different line.
Once a line has been connected to the process, all issued INPUTs and PRINTs affect that line and not the user’s. CRTs and INPUT@s continue to work with the user’s line as they did previously.
SYSTEM(14), which returns the number of characters in the type-ahead buffer, returns it for the connected line, not the user’s. SYSTEM(13) always returns the number of characters in the type-ahead buffer.
DISCONNECT releases the connected line, allowing the user to once again use PRINT and INPUT to issue terminal I/O on the user’s process' line. Terminating the user’s program automatically performs a DISCONNECT.
If the CONNECT fails, the ELSE clause is taken, and SYSTEM(0) gives the reason for the failure.
See Also