Reference Guide > H Routines > HDFPUTFILEANN Function
  

HDFPUTFILEANN Function
Inserts HDF file labels and file descriptions (annotations) into a file.
Usage
status = HDFPUTFILEANN (filename)
Input Parameters
filename—A string containing the name of the HDF file.
Return Value
status—The status of the function call, where:
*SUCCEED (0)—Indicates success.
*FAIL (–1)—Indicates failure.
Keywords
Description—A byte array that contains the description for the specified file. This byte array may require further processing later for display of the description.
Help—If present and nonzero, lists the usage for this routine.
Label—A string variable that contains the label for the specified file.
Usage—If present and nonzero, lists the usage for this routine. (Same as the Help keyword.)
Discussion
Multiple calls to HDFPUTFILEANN will cause additional labels/descriptions to be added in the file. There is no way known to overwrite an existing file label/description, other than to start writing a new file.
Example 1
hdf_init
@hdf_common
testfile = !Data_dir + '/raster8.hdf'
label = 'Put File Label (ID) Test'
status = HDFPUTFILEANN(testfile, Label=label)
IF (status EQ FAIL) THEN  $
   MESSAGE, 'Failed HDFPUTFILEANN with Label.'
Example 2
hdf_init
@hdf_common
testfile = !Data_dir + '/raster8.hdf'
desc = BYTE ('Put File Description Test')
status = HDFPUTFILEANN(testfile, Description=desc)
IF (status EQ FAIL) THEN  $
   MESSAGE, 'Failed HDFPUTFILEANN with Description.'
See Also
HDFGETFILEANN
Refer to the following routines in the HDF Reference Manual:
DFANADDFID, DFANADDFDS, HCLOSE, HOPEN
For more information on using the HDF interface and the calling sequence for the entire suite of HDF base functions, refer to PV-WAVE HDF Interface.
For a complete list of the HDF convenience routines, refer to Functional Summary of Routines.

Version 2017.1
Copyright © 2019, Rogue Wave Software, Inc. All Rights Reserved.