The HDF_LIB_INFO procedure returns information about the HDF Library being used by this version of IDL, or information about the version of HDF used to create a particular HDF file.

Examples


Example 1

HDF_LIB_INFO, MAJOR=MAJOR, MINOR=MINOR, VERSION=VER, RELEASE=REL
PRINT, 'IDL ', !version.release, ' uses HDF Library ', $
   MAJOR, MINOR, REL, FORMAT='(A,A,A,I1,".",I1,"r",I1,A)'
PRINT, VER

IDL Output

IDL 5.3 uses HDF Library 4.1r3
NCSA HDF Version 4.1 Release 3, May 1999

Example 2

The following example tests the version of HDF used to create a particular file. Note that the strings returned will depend solely upon the version of the HDF library used to create the file. In this example, it is the same as the library compiled into the current version of IDL since it is the current IDL that is creating the file.

file='example.hdf'
id=HDF_OPEN(file, /CREATE)
HDF_LIB_INFO, id, VERSION=VER
PRINT, 'The file ', file,' was created with : ', VER
HDF_CLOSE, id

IDL Output

The file example.hdf was created with : 
NCSA HDF Version 4.1 Release 3, May 1999

Syntax


HDF_LIB_INFO, [FileHandle] [, MAJOR=variable] [, MINOR=variable] [, RELEASE=variable] [, VERSION=variable]

Arguments


FileHandle

The HDF filehandle returned from a previous call to HDF_OPEN.

Keywords


MAJOR

Set this keyword equal to a named variable that will contain the major version number of the HDF library currently in use by IDL. If the FileHandle argument is supplied, the variable will contain the major version number of the HDF library used by that particular HDF file.

MINOR

Set this keyword equal to a named variable that will contain the minor version number of the HDF library currently in use by IDL. If the FileHandle argument is supplied, the variable will contain the minor version number of the HDF library used by that particular HDF file.

RELEASE

Set this keyword equal to a named variable that will contain the release number of the HDF library currently in use by IDL. If the FileHandle argument is supplied, the variable will contain the release number of the HDF library used by that particular HDF file.

VERSION

Set this keyword equal to a named variable that will contain the version number text string of the HDF library currently in use by IDL. If the FileHandle argument is supplied, the variable will contain the version number text string of the HDF library used by that particular HDF file.

Version History


5.1

Introduced