# NAG Library Function Document

## 1Purpose

nag_close_file (x04adc) closes a file associated with a given file identifier.

## 2Specification

 #include #include
 void nag_close_file (Nag_FileID fileid, NagError *fail)

## 3Description

nag_close_file (x04adc) closes a file associated with a given file identifier (as returned by a call of nag_open_file (x04acc)).

None.

## 5Arguments

1:    $\mathbf{fileid}$Nag_FileIDInput
On entry: the identifier of the file to be closed. This must have been returned by a call of nag_open_file (x04acc). Note that if the filename passed to nag_open_file (x04acc) was blank or NULL, nag_close_file (x04adc) does nothing.
2:    $\mathbf{fail}$NagError *Input/Output
The NAG error argument (see Section 3.7 in How to Use the NAG Library and its Documentation).

## 6Error Indicators and Warnings

NE_NOT_CLOSE_FILEID
Cannot close file associated with identifier $〈\mathit{\text{value}}〉$.

Not applicable.