Write a scalar 32-bit integer
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=HID_T), | intent(in) | :: | loc_id | HDF5 file or group identifier |
||
character(len=*), | intent(in) | :: | dset_name | Name of the dataset to create |
||
integer, | intent(inout) | :: | x | Data to be written to the dataset |
||
integer, | intent(out) | :: | error | HDF5 error code |
subroutine h5ltread_dataset_int_scalar_f(loc_id, dset_name, x, error)
!+ Write a scalar 32-bit integer
IMPLICIT NONE
integer(HID_T), intent(in) :: loc_id
!+ HDF5 file or group identifier
character(len=*), intent(in) :: dset_name
!+ Name of the dataset to create
integer, intent(inout) :: x
!+ Data to be written to the dataset
integer, intent(out) :: error
!+ HDF5 error code
integer(HSIZE_T), dimension(1) :: dims(1) = 1
integer, dimension(1) :: dummy
call h5ltread_dataset_int_f(loc_id, dset_name, dummy, dims, error)
x = dummy(1)
end subroutine h5ltread_dataset_int_scalar_f