Explanation
CLOSE Statement
Closes one or more open files or devices.Worth knowing
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
CLOSE [[#]filenumber%[,[#]filenumber%]...] |
filenumber% | The number of an open file or device. |
CLOSE with no arguments closes all open files and devices. |
CLS
INPUT "Enter filename: ", n$
OPEN n$ FOR OUTPUT AS #1
PRINT #1, "This is saved to the file."
CLOSE
OPEN n$ FOR INPUT AS #1
INPUT #1, a$
PRINT "Read from file: "; a$
CLOSE