HDF_DFAN_GETFDS procedure reads the next available file description from an HDF file.
A string containing the name of the file to be read.
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
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.
Set this keyword to read the first file description in the file. If FIRST is not set, the next available file description (which can be the first file description) will be read.
Set this keyword to return
as a string instead of a vector of bytes.
filename = 'DEMOfds.hdf'
fds1 = 'FILE DESCRIPTION NUMBER 1'
fds2 = 'SHORT FDS 2'
fid = HDF_OPEN(filename, /CREATE)
HDF_DFAN_ADDFDS, filename, fds1
HDF_DFAN_ADDFDS, filename, fds2
HDF_DFAN_GETFDS, filename, out_fds1, /FIRST
OUT_FDS1 BYTE = Array(25)
FILE DESCRIPTION NUMBER 1
HDF_DFAN_GETFDS, filename, out_fds2, /STRING
OUT_FDS2 STRING = 'SHORT FDS 2'