H5_VERSION_GE(
int maj,
int min,
int rel
)
H5_VERSION_GE
and H5_VERSION_LE
macros are used at compile time to conditionally include or exclude
code based on the version of the HDF5 library against which
an application will be linked.
H5_VERSION_GE
macro compares the version of
the HDF5 library being used against the version number specified
in the parameters.
For more information, see “HDF5 Software Updates” at
www.hdfgroup.org/HDF5/doc/TechNotes/Version.html
.
int maj |
IN: Major version number A non-negative integer value |
int min |
IN: Minor version number A non-negative integer value |
int rel |
IN: Release number A non-negative integer value |
TRUE |
If the library version is greater than or equal to the version number specified |
FALSE |
If the library version is less than the version number specified |
A library version is greater than the specified version number if its major version is larger than the specified major version number. If the major version numbers are the same, it is greater than the specified version number if its minor version is larger than the specified minor version number. If the minor version numbers are the same, then a library version would be greater than the specified version number if its release number is larger than the specified release number.
H5Lxxx
,
are new in the 1.8 versions of HDF5,
and some group functions, H5Gxxx
,
are deprecated in the 1.8 versions.
The following code uses H5Ldelete
if the library version
is 1.8.0 or greater or uses H5Gunlink
if the
library version is not greater than 1.8.0.
Similarly, the code calls H5Lexists
or
H5Gopen
to make sure the group has been deleted.
#if H5_VERSION_GE(1,8,0) ret = H5Ldelete(file, "Group", H5P_DEFAULT); CHECK(ret, FAIL, "H5Lunlink"); status = H5Lexists(file, "Group", H5P_DEFAULT); VERIFY(status, FALSE, "H5Lexists"); #else ret = H5Gunlink(file, "Group"); CHECK(ret, FAIL, "H5Gunlink"); H5E_BEGIN_TRY { grp = H5Gopen(file, "Group"); } H5E_END_TRY; VERIFY(grp, FAIL, "H5Gopen"); #endif
Release |
Change |
1.8.7 | C macro introduced in this release. |