diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2009-04-17 14:26:52 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2009-04-17 14:26:52 (GMT) |
commit | 4e42b24ccea4bd39b0c60924ec9e5cffc8b66fb1 (patch) | |
tree | 727d1b29cbf1867b8f6e6c18f97fb6857f9212b5 /fortran/src/H5Iff.f90 | |
parent | 5287eef54938f42b96a0e6738ecc719d7b3df16f (diff) | |
download | hdf5-4e42b24ccea4bd39b0c60924ec9e5cffc8b66fb1.zip hdf5-4e42b24ccea4bd39b0c60924ec9e5cffc8b66fb1.tar.gz hdf5-4e42b24ccea4bd39b0c60924ec9e5cffc8b66fb1.tar.bz2 |
[svn-r16774] Description:
Added Fortran API H5Iis_valid_f
Platforms tested: smirom - ifort pgf90
Diffstat (limited to 'fortran/src/H5Iff.f90')
-rw-r--r-- | fortran/src/H5Iff.f90 | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/fortran/src/H5Iff.f90 b/fortran/src/H5Iff.f90 index 0b70f8b..83587ce 100644 --- a/fortran/src/H5Iff.f90 +++ b/fortran/src/H5Iff.f90 @@ -306,5 +306,47 @@ hdferr = h5iget_file_id_c(obj_id, file_id) END SUBROUTINE h5iget_file_id_f +!---------------------------------------------------------------------- +! Name: H5Iis_valid_f +! +! Purpose: Check if an ID is valid without producing an error message +! +! Inputs: id - identifier +! Outputs: +! valid - status of id as a valid identifier +! hdferr: - error code +! Success: 0 +! Failure: -1 +! Programmer: M. Scot Breitenfeld +! April 13, 2009 +! +! Comment: +!---------------------------------------------------------------------- + SUBROUTINE h5iis_valid_f(id, valid, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: id ! Identifier + LOGICAL, INTENT(OUT) :: valid ! Status of id as a valid identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: c_valid ! 0 = .false, 1 = .true. + + INTERFACE + INTEGER FUNCTION h5iis_valid_c(id, c_valid) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IIS_VALID_C':: h5iis_valid_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: id ! Identifier + INTEGER :: c_valid + END FUNCTION h5iis_valid_c + END INTERFACE + + hdferr = h5iis_valid_c(id, c_valid) + + valid = .FALSE. ! Default + IF(c_valid.EQ.1) valid = .TRUE. + + END SUBROUTINE h5iis_valid_f + + END MODULE H5I |