CLOSE statement

Purpose: The CLOSE statement causes the file stream associated with a file handle to be flushed and the file to be closed.


Syntax 1:

 CLOSE FileHandle

Parameters:

  • FileHandle Handle to one file to be closed.

Syntax 2:

 CLOSE

Parameters:

  • None. CLOSE without an argument will close all open file handles.

Remarks

Specifying more than one file handle is not allowed.

See the OPEN statement page for more details.

Example:


 CLOSE FP1

BCX Console Sample Programs using CLOSE statement.

S10.bas, S82.bas, S103.bas, S113.bas, S115.bas