The HDF_DFAN_ADDFID procedure adds a file annotation to an HDF file. A file can have multiple annotations added.

Examples


; 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

IDL Output

FID1            STRING    = 'File Annotation #1'
FID2            STRING    = 'File Annotation #2'
 
% HDF_DFAN_GETFID: Could not read ID length
 
FID4            STRING    = 'File Annotation #1'

Syntax


HDF_DFAN_ADDFID, Filename, Label

Arguments


Filename

A scalar string containing the name of the file to be written.

Label

A string containing the annotation string.

Keywords


None

Version History


4.0

Introduced