basic.close

Statement/BASIC Program, Releases: AP

Closes file.

Syntax

close {file.variable}

Description

closes the file identified by 'file.variable'. If file.variable is not defined, the file referenced by the default file.variable is closed. This statement must be used if a file is opened and then a 'delete-file' is executed with an 'execute' statement.

Files 'close' by default when a program ends.

Example

open 'testfile' to testfile then
close testfile
execute 'delete-file testfile'
end
execute 'create-file testfile ':newdictmod:' ':newdatamod

See Also

Command Name Type Description
basic.statements Definition Definition of statements and functions.
tcl.delete-file Verb: Access Deletes file from account.
basic.file.variable Definition Defines file location from previous 'open' statement.
basic.open Statement Opens file for input and output.
file.control.block Definition Description of file control block.

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.