<<

Contents

Search

>>

 

CLOSE

 

 

Instruction

 

 

Syntax:

CLOSE <File Number> ON ERROR … END

 

<File Number> = <NUM-EXPRESSION>

 

Meaning:

Closes a sequential or random file.

 

The file specified by <File number> is closed. If an error occurs, the block ON ERROR ... END is executed. In the case of an error the variable OK contains the error number, ERRORTEXT$ contains the error text.

 

Parameter:

File Number

Number of file

 

Sample:

CLOSE 2 ON ERROR ERRORMES = "Close-Error" + STR$(OK) + ": " + ERRORTEXT$

        END

 

See also:

OPEN

Error numbers