The HDF_DFAN_ADDFID procedure adds a file annotation to a Hierarchical Data Format file. A file can have multiple annotations added.
hid = HDF_OPEN(filename,/CREATE)
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
FID1 STRING = 'File Annotation #1'
FID2 STRING = 'File Annotation #2'
Try to read a non-existant FID:
HDF_DFAN_GETFID, filename, fid3
% HDF_DFAN_GETFID: Could not read ID length
Read the FIRST fid again, using the FIRST keyword:
HDF_DFAN_GETFID, filename, fid4, /FIRST