summaryrefslogtreecommitdiffstats
path: root/fortran/examples/refregexample.f90
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2000-10-10 14:31:50 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2000-10-10 14:31:50 (GMT)
commit1c90281db5674c175cd375ab9e38a1cb66d1c729 (patch)
treec7da8d59f866aa06b34212b15f72c682feab4ffa /fortran/examples/refregexample.f90
parent123072a92229cdcef9edeb1f3860297febdfe98f (diff)
downloadhdf5-1c90281db5674c175cd375ab9e38a1cb66d1c729.zip
hdf5-1c90281db5674c175cd375ab9e38a1cb66d1c729.tar.gz
hdf5-1c90281db5674c175cd375ab9e38a1cb66d1c729.tar.bz2
[svn-r2654]
Purpose: Updated source code to use new APIs to write/read references Description and Solution: Write/read subrotine has extra parameter - size of the reference array. I modified the source to reflect this change. Platforms tested: Solaris 2.6
Diffstat (limited to 'fortran/examples/refregexample.f90')
-rw-r--r--fortran/examples/refregexample.f907
1 files changed, 5 insertions, 2 deletions
diff --git a/fortran/examples/refregexample.f90 b/fortran/examples/refregexample.f90
index 47ebaac..298f60e 100644
--- a/fortran/examples/refregexample.f90
+++ b/fortran/examples/refregexample.f90
@@ -36,6 +36,7 @@
INTEGER(HSSIZE_T) , DIMENSION(2,3) :: coord
INTEGER(SIZE_T) ::num_points = 3 ! Number of selected points
INTEGER :: i, j
+ INTEGER :: ref_size
coord = reshape((/1,1,2,7,1,9/), (/2,3/)) ! Coordinates of selected points
data = reshape ((/1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6/), (/2,9/))
!
@@ -92,7 +93,8 @@
!
! Write dataset with the references.
!
- CALL h5dwrite_f(dsetr_id, H5T_STD_REF_DSETREG, ref, error)
+ ref_size = size(ref)
+ CALL h5dwrite_f(dsetr_id, H5T_STD_REF_DSETREG, ref, ref_size, error)
!
! Close all objects.
!
@@ -108,7 +110,8 @@
!
! Read references to the dataset regions.
!
- CALL h5dread_f(dsetr_id, H5T_STD_REF_DSETREG, ref_out, error)
+ ref_size = size(ref_out)
+ CALL h5dread_f(dsetr_id, H5T_STD_REF_DSETREG, ref_out, ref_size, error)
!
! Dereference the first reference.
!