The HDF_DFAN_GETFDS procedure reads the next available file description from an HDF file.
Examples
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
HELP, out_fds1
PRINT, STRING(out_fds1)
HDF_DFAN_GETFDS, filename, out_fds2, /STRING
HELP, out_fds2
HDF_CLOSE, fid
IDL Output
OUT_FDS1 BYTE = Array(25)
FILE DESCRIPTION NUMBER 1
OUT_FDS2 STRING = 'SHORT FDS 2'
Syntax
HDF_DFAN_GETFDS, Filename, Description [, /FIRST] [, /STRING]
Arguments
Filename
A string containing the name of the file to be read.
Description
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.
Keywords
FIRST
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.
STRING
Set this keyword to return Description as a string instead of a vector of bytes.
Version History
See Also
HDF_DFAN_ADDFDS, HDF_DFAN_ADDFID, HDF_DFAN_GETDESC, HDF_DFAN_GETFID