|
Scientific Data Formats: Hierarchical Data Format |
|
The HDF_DFAN_ADDFID procedure adds a file annotation to an HDF file. A file can have multiple annotations added.
HDF_DFAN_ADDFID, Filename, Label
A scalar string containing the name of the file to be written.
A string containing the annotation string.
None
; Open the HDF file: filename = 'FID.hdf' hid = HDF_OPEN(filename,/CREATE) ; Write two file annotations: HDF_DFAN_ADDFID, filename, 'File Annotation #1' HDF_DFAN_ADDFID, filename, 'File Annotation #2' ; Read the two annotations back: HDF_DFAN_GETFID, filename, fid1 HDF_DFAN_GETFID, filename, fid2 HELP, fid1, fid2 ; Try to read a non-existent FID: HDF_DFAN_GETFID, filename, fid3 ; Read the FIRST fid again, using the FIRST keyword: HDF_DFAN_GETFID, filename, fid4, /FIRST HELP, fid4 ; Close the HDF file: HDF_CLOSE, hid