summaryrefslogtreecommitdiffstats
path: root/fortran/examples/compound.f90
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2001-04-27 03:52:24 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2001-04-27 03:52:24 (GMT)
commitfef182fd966c8c113a5bab02f19afca4c91f0ba5 (patch)
tree952bcd243d030ea9fc63bf6d457754abdbbea1c0 /fortran/examples/compound.f90
parent9aba4e88c26d98aafaf231163e949b9a53aa9561 (diff)
downloadhdf5-fef182fd966c8c113a5bab02f19afca4c91f0ba5.zip
hdf5-fef182fd966c8c113a5bab02f19afca4c91f0ba5.tar.gz
hdf5-fef182fd966c8c113a5bab02f19afca4c91f0ba5.tar.bz2
[svn-r3862]
Purpose: Codemaintenance Description: read/write APIs have been changed. Solution: Made necessary changes to the source code. Platforms tested: Linux, Solaris 2.7, O2K, T3E
Diffstat (limited to 'fortran/examples/compound.f90')
-rw-r--r--fortran/examples/compound.f9012
1 files changed, 7 insertions, 5 deletions
diff --git a/fortran/examples/compound.f90 b/fortran/examples/compound.f90
index a2bd6b0..0bb6672 100644
--- a/fortran/examples/compound.f90
+++ b/fortran/examples/compound.f90
@@ -48,6 +48,8 @@
DOUBLE PRECISION, DIMENSION(dimsize) :: double_member
REAL, DIMENSION(dimsize) :: real_member
INTEGER :: i
+ INTEGER, DIMENSION(7) :: data_dims
+ data_dims(1) = dimsize
!
! Initialize data buffer.
!
@@ -145,10 +147,10 @@
!
! Write data by fields in the datatype. Fields order is not important.
!
- CALL h5dwrite_f(dset_id, dt4_id, real_member, error, xfer_prp = plist_id)
- CALL h5dwrite_f(dset_id, dt1_id, char_member, error, xfer_prp = plist_id)
- CALL h5dwrite_f(dset_id, dt3_id, double_member, error, xfer_prp = plist_id)
- CALL h5dwrite_f(dset_id, dt2_id, int_member, error, xfer_prp = plist_id)
+ CALL h5dwrite_f(dset_id, dt4_id, real_member, data_dims, error, xfer_prp = plist_id)
+ CALL h5dwrite_f(dset_id, dt1_id, char_member, data_dims, error, xfer_prp = plist_id)
+ CALL h5dwrite_f(dset_id, dt3_id, double_member, data_dims, error, xfer_prp = plist_id)
+ CALL h5dwrite_f(dset_id, dt2_id, int_member, data_dims, error, xfer_prp = plist_id)
!
! End access to the dataset and release resources used by it.
@@ -195,7 +197,7 @@
!
! Read part of the datatset and display it.
!
- CALL h5dread_f(dset_id, dt1_id, char_member_out, error)
+ CALL h5dread_f(dset_id, dt1_id, char_member_out, data_dims, error)
write(*,*) (char_member_out(i), i=1, dimsize)
!