summaryrefslogtreecommitdiffstats
path: root/fortran/examples
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2002-05-31 20:11:54 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2002-05-31 20:11:54 (GMT)
commitae818ca9df9e12f4ba32e85de2f49ce164a0095f (patch)
treee410bfcf872b490298988e2f374ecb83c8b91c1e /fortran/examples
parent4a3fa29c25e2ad0acef8621e21cbd546c184e269 (diff)
downloadhdf5-ae818ca9df9e12f4ba32e85de2f49ce164a0095f.zip
hdf5-ae818ca9df9e12f4ba32e85de2f49ce164a0095f.tar.gz
hdf5-ae818ca9df9e12f4ba32e85de2f49ce164a0095f.tar.bz2
[svn-r5492]
Purpose: Code clean up. Description: Many F90 compilers were not happy about character*(*) declarations. Solution: Used F90 character(len=*) declarations. Platforms tested: Solaris 2.7 and Linux 2.4
Diffstat (limited to 'fortran/examples')
-rw-r--r--fortran/examples/attrexample.f904
-rw-r--r--fortran/examples/compound.f904
2 files changed, 3 insertions, 5 deletions
diff --git a/fortran/examples/attrexample.f90 b/fortran/examples/attrexample.f90
index 99ff789..0ac5cf8 100644
--- a/fortran/examples/attrexample.f90
+++ b/fortran/examples/attrexample.f90
@@ -24,8 +24,7 @@
INTEGER :: arank = 1 ! Attribure rank
INTEGER(SIZE_T) :: attrlen ! Length of the attribute string
-! CHARACTER*27, DIMENSION(2) :: attr_data ! Attribute data
- CHARACTER*80, DIMENSION(2) :: attr_data ! Attribute data
+ CHARACTER(LEN=80), DIMENSION(2) :: attr_data ! Attribute data
INTEGER :: error ! Error flag
INTEGER, DIMENSION(7) :: data_dims
@@ -36,7 +35,6 @@
!
attr_data(1) = "Dataset character attribute"
attr_data(2) = "Some other string here "
-! attrlen = 27
attrlen = 80
!
! Initialize FORTRAN interface.
diff --git a/fortran/examples/compound.f90 b/fortran/examples/compound.f90
index 0bb6672..0ef22e6 100644
--- a/fortran/examples/compound.f90
+++ b/fortran/examples/compound.f90
@@ -42,8 +42,8 @@
INTEGER(SIZE_T) :: type_sized ! Size of the double precision datatype
INTEGER(SIZE_T) :: type_sizer ! Size of the real datatype
INTEGER(SIZE_T) :: offset ! Member's offset
- CHARACTER*2, DIMENSION(dimsize) :: char_member
- CHARACTER*2, DIMENSION(dimsize) :: char_member_out ! Buffer to read data out
+ CHARACTER(LEN=2), DIMENSION(dimsize) :: char_member
+ CHARACTER(LEN=2), DIMENSION(dimsize) :: char_member_out ! Buffer to read data out
INTEGER, DIMENSION(dimsize) :: int_member
DOUBLE PRECISION, DIMENSION(dimsize) :: double_member
REAL, DIMENSION(dimsize) :: real_member