| CLOSE | |
| Syntax | CLOSE channel (CLOSE) |
| Explanation | CLOSE concludes any pending operations
with the stream number specified and releases the stream
for reuse. CLOSE is necessary for all file output
operations, since data is automatically buffered in
memory and not sent to the disk drive until a large
quantity is ready to go. If an output stream is not
closed, you may lose data. If CLOSE is used without any inputs and is enclosed in parentheses, all open data streams are closed and I/O will revert to the Listener. |
| Example | TO TYPE.FILE :FILE MAKE "CHANNEL OPEN :FILE MAKE "STANDARD.INPUT :CHANNEL WHILE [NOT EOF?] [PRINT RQ] CLOSE :CHANNEL END TYPE.FILE defined This is line 1 This is line 2 This is line 3 |