Routines (alphabetical) > Routines: C > CDF Routines > CDF_CLOSE

# CDF_CLOSE

The CDF_CLOSE procedure closes the specified Common Data Format file. The CDF’s data buffers are flushed, all of the CDF’s open files are closed, and the CDF identifier is freed. You must use CDF_CLOSE to close a CDF file to guarantee that all modifications you have made are actually written to disk.

## Examples

; Open a file:

id = CDF_OPEN('open_close.cdf'

; ... Other CDF_ commands go here.

; Close the cdf file.

CDF_CLOSE, id

## Syntax

CDF_CLOSE, Id

## Arguments

### Id

The CDF ID of the file to be closed, returned from a previous call to CDF_OPEN or CDF_CREATE.

## Keywords

None

## Version History

Pre 4.0 | Introduced