English
Language : 

NSB8 Datasheet, PDF (37/158 Pages) List of Unclassifed Manufacturers – BASIC interpreter for Z80 family
ITALIAN TECHNOLOGY
grifo®
CLOSE
STATEMENT:
CLOSE #<file number expression>
ACTION:
Prevents further access to the file with the specified file number. Also guarantees that RAM buffer
space for the file is written to the file on diskette if necessary.
EXAMPLES:
CLOSE #1
CLOSE #A*2
CLOSE #B7(3)
REMARKS:
Files should be CLOSED as soon as there is no longer any need to READ from or WRITE to
them. This insures that any changes made to the files will be permanent, because the buffer is written
out, if necessary, when a CLOSE occurs.
The “buffer-flushing” action of the CLOSE statement, where accumulated data is actually written
to the diskette file, will also occur under the following circumstances:
a) The file pointer is changed to address a byte location in another file block.
b) An END or CHAIN statement is executed.
c) A STOP statement is executed or a <control-C> interruption occurs.
d) The program halts because of a program error.
Only the execution of CLOSE, END, or CHAIN statements, however, will disassociate the diskette
file from its file number. During an interruption caused by STOP, <control-C>, or a program error,
any files OPENed within the program remain OPEN, and may be accessed in direct mode.
ERROR MESSAGES:
FILE ERROR
The file number expression did not evaluate to an integer from 0 to 7, or the diskette is write-
protected.
SEE ALSO:
Statement OPEN
Section FILES
NSB8
Rel. 5.10
Page 25