summaryrefslogtreecommitdiffstats
path: root/fortran/examples/grpit.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/grpit.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/grpit.f90')
-rw-r--r--fortran/examples/grpit.f9010
1 files changed, 8 insertions, 2 deletions
diff --git a/fortran/examples/grpit.f90 b/fortran/examples/grpit.f90
index 3aff2ad..3616eca 100644
--- a/fortran/examples/grpit.f90
+++ b/fortran/examples/grpit.f90
@@ -33,9 +33,11 @@
INTEGER, DIMENSION(3,3) :: dset1_data ! Arrays to hold data
INTEGER, DIMENSION(2,10) :: dset2_data !
+
INTEGER(HSIZE_T), DIMENSION(2) :: dims1 = (/3,3/) ! Dataset dimensions
INTEGER(HSIZE_T), DIMENSION(2) :: dims2 = (/2,10/)!
INTEGER :: rank = 2 ! Datasets rank
+ INTEGER, DIMENSION(7) :: data_dims
!
! Initialize dset1_data array.
@@ -90,7 +92,9 @@
!
! Write the first dataset.
!
- CALL h5dwrite_f(dataset1_id, H5T_NATIVE_INTEGER, dset1_data, error)
+ data_dims(1) = 3
+ data_dims(2) = 3
+ CALL h5dwrite_f(dataset1_id, H5T_NATIVE_INTEGER, dset1_data, data_dims, error)
!
! Create the data space for the second dataset.
@@ -106,7 +110,9 @@
!
! Write the second dataset
!
- CALL h5dwrite_f(dataset2_id, H5T_NATIVE_INTEGER, dset2_data, error)
+ data_dims(1) = 2
+ data_dims(2) = 10
+ CALL h5dwrite_f(dataset2_id, H5T_NATIVE_INTEGER, dset2_data, data_dims, error)
!
! Get number of members in the root group.