The HDF_DFAN_GETFDS procedure reads the next available file description from an HDF file.
A named variable in which the description is returned. By default, the description is returned as a vector of bytes. Set the STRING keyword to return the description as a string.
If a description does not exist, the Description variable will contain either a 0L (long-integer zero) or a blank string, and a warning message will be printed. Warning messages can be suppressed by setting the !QUIET system variable to a non-zero value.
fds1 = 'FILE DESCRIPTION NUMBER 1'
fid = HDF_OPEN(filename, /CREATE) ; Create an HDF file.
HDF_DFAN_ADDFDS, filename, fds1 ; Add first file description.
HDF_DFAN_ADDFDS, filename, fds2 ; Add second file description.
HDF_DFAN_GETFDS, filename, out_fds1, /FIRST
;
Get the first file description.
HDF_DFAN_GETFDS, filename, out_fds2, /STRING
;
Get the second file description.
HDF_DFAN_ADDFDS , HDF_DFAN_ADDFID , HDF_DFAN_GETDESC , HDF_DFAN_GETFID