FANDOM


Syntax

CLOSE streamnumber

(CLOSE)

Explanation

CLOSE concludes any pending operations with the stream number specified and releases the stream for reuse. If the stream number has not been opened, an error will occur.

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, all open data streams are closed and I/O will reverts to the console and keyboard. Only the copy stream opened with the COPYON command remains open.

See also OPEN and CREATE.

Example

The following procedure creates a disk file and prints an address into it.

TO ADDRESS.LIST

MAKE "STANDARD.OUTPUT CREATE "ADDRESS
PRINT [JOHN Q. PUBLIC]
PRINT [ANYTOWN, U.S.A.]
CLOSE :STANDARD.OUTPUT
MAKE "STANDARD.OUTPUT 0

END

To view the file, enter the editor and load the file ADDRESS.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.