summaryrefslogtreecommitdiffstats
path: root/fortran/examples/hyperslab.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/hyperslab.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/hyperslab.f90')
-rw-r--r--fortran/examples/hyperslab.f9014
1 files changed, 10 insertions, 4 deletions
diff --git a/fortran/examples/hyperslab.f90 b/fortran/examples/hyperslab.f90
index ec24d98..f8e6bfe 100644
--- a/fortran/examples/hyperslab.f90
+++ b/fortran/examples/hyperslab.f90
@@ -38,6 +38,7 @@
INTEGER :: i, j, k
INTEGER :: error, error_n ! Error flags
+ INTEGER, DIMENSION(7) :: data_dims
!
@@ -84,7 +85,9 @@
!
! Write the dataset.
!
- CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, error)
+ data_dims(1) = 5
+ data_dims(2) = 6
+ CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, data_dims, error)
!
! Close the dataspace for the dataset.
@@ -109,9 +112,9 @@
!
! Initialize data_out array.
!
- do i = 1, 7
+ do k = 1, 3
do j = 1, 7
- do k = 1,3
+ do i = 1, 7
data_out(i,j,k) = 0;
end do
end do
@@ -154,7 +157,10 @@
! Read data from hyperslab in the file into the hyperslab in
! memory and display.
!
- CALL H5Dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, error, &
+ data_dims(1) = 7
+ data_dims(2) = 7
+ data_dims(3) = 3
+ CALL H5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error, &
memspace, dataspace)
!