diff options
author | Elena Pourmal <epourmal@hdfgroup.org> | 2002-05-31 20:11:54 (GMT) |
---|---|---|
committer | Elena Pourmal <epourmal@hdfgroup.org> | 2002-05-31 20:11:54 (GMT) |
commit | ae818ca9df9e12f4ba32e85de2f49ce164a0095f (patch) | |
tree | e410bfcf872b490298988e2f374ecb83c8b91c1e | |
parent | 4a3fa29c25e2ad0acef8621e21cbd546c184e269 (diff) | |
download | hdf5-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
-rw-r--r-- | fortran/examples/attrexample.f90 | 4 | ||||
-rw-r--r-- | fortran/examples/compound.f90 | 4 | ||||
-rw-r--r-- | fortran/test/fortranlib_test.f90 | 8 | ||||
-rw-r--r-- | fortran/test/tH5A.f90 | 6 | ||||
-rw-r--r-- | fortran/test/tH5G.f90 | 4 | ||||
-rw-r--r-- | fortran/test/tH5P.f90 | 2 | ||||
-rw-r--r-- | fortran/test/tH5T.f90 | 6 |
7 files changed, 16 insertions, 18 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 diff --git a/fortran/test/fortranlib_test.f90 b/fortran/test/fortranlib_test.f90 index 13e96b0..2c5c13a 100644 --- a/fortran/test/fortranlib_test.f90 +++ b/fortran/test/fortranlib_test.f90 @@ -26,10 +26,10 @@ INTEGER :: identifier_total_error = 0 INTEGER :: group_total_error = 0 INTEGER :: error_total_error = 0 - CHARACTER*8 error_string - CHARACTER*8 :: success = ' PASSED ' - CHARACTER*8 :: failure = '*FAILED*' - CHARACTER*4 :: e_format ='(8a)' + CHARACTER(LEN=8) error_string + CHARACTER(LEN=8) :: success = ' PASSED ' + CHARACTER(LEN=8) :: failure = '*FAILED*' + CHARACTER(LEN=4) :: e_format ='(8a)' CALL h5open_f(error) write(*,*) ' ========================== ' diff --git a/fortran/test/tH5A.f90 b/fortran/test/tH5A.f90 index e5c5ad3..cec25de 100644 --- a/fortran/test/tH5A.f90 +++ b/fortran/test/tH5A.f90 @@ -60,11 +60,11 @@ INTEGER(HID_T) :: attr4_type !Returned REAL Attribute Datatype identifier INTEGER(HID_T) :: attr5_type !Returned INTEGER Attribute Datatype identifier INTEGER :: num_attrs !number of attributes - CHARACTER*256 :: attr_name !buffer to put attr_name + CHARACTER(LEN=256) :: attr_name !buffer to put attr_name INTEGER(SIZE_T) :: name_size = 80 !attribute name length - CHARACTER*35, DIMENSION(2) :: attr_data ! String attribute data - CHARACTER*35, DIMENSION(2) :: aread_data ! Buffer to put read back + CHARACTER(LEN=35), DIMENSION(2) :: attr_data ! String attribute data + CHARACTER(LEN=35), DIMENSION(2) :: aread_data ! Buffer to put read back ! string attr data CHARACTER :: attr_character_data = 'A' DOUBLE PRECISION, DIMENSION(1) :: attr_double_data = 3.459 diff --git a/fortran/test/tH5G.f90 b/fortran/test/tH5G.f90 index 5486bb8..8200f6b 100644 --- a/fortran/test/tH5G.f90 +++ b/fortran/test/tH5G.f90 @@ -37,8 +37,8 @@ INTEGER :: rank = 1 ! Datasets rank INTEGER :: error ! Error flag INTEGER(SIZE_T) :: namesize = 100 !size for symbolic object - CHARACTER*100 :: name !name to put symbolic object - CHARACTER*100 :: commentout !comment to the file + CHARACTER(LEN=100) :: name !name to put symbolic object + CHARACTER(LEN=100) :: commentout !comment to the file INTEGER :: nmembers INTEGER :: obj_type INTEGER, DIMENSION(7) :: data_dims diff --git a/fortran/test/tH5P.f90 b/fortran/test/tH5P.f90 index ed7ca60..0567b21 100644 --- a/fortran/test/tH5P.f90 +++ b/fortran/test/tH5P.f90 @@ -16,7 +16,7 @@ INTEGER(HID_T) :: dataset_id INTEGER(HSIZE_T), DIMENSION(1) :: cur_size !data space current size INTEGER(HSIZE_T), DIMENSION(1) :: max_size !data space maximum size - CHARACTER*256 :: name !external file name + CHARACTER(LEN=256) :: name !external file name INTEGER :: file_offset !external file offset INTEGER(HSIZE_T) :: file_size !sizeof external file segment INTEGER :: error !error code diff --git a/fortran/test/tH5T.f90 b/fortran/test/tH5T.f90 index 0f9a39c..43c3a9e 100644 --- a/fortran/test/tH5T.f90 +++ b/fortran/test/tH5T.f90 @@ -51,8 +51,8 @@ INTEGER(SIZE_T) :: type_sizer ! Size of the real datatype INTEGER(SIZE_T) :: offset ! Member's offset INTEGER(SIZE_T) :: offset_out ! 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 INTEGER, DIMENSION(dimsize) :: int_member_out DOUBLE PRECISION, DIMENSION(dimsize) :: double_member @@ -62,7 +62,7 @@ INTEGER :: i INTEGER :: class ! Datatype class INTEGER :: num_members ! Number of members in the compound datatype - CHARACTER*256 :: member_name + CHARACTER(LEN=256) :: member_name INTEGER :: len ! Lenght of the name of the compound datatype member LOGICAL :: flag INTEGER(HSIZE_T), DIMENSION(3) :: array_dims=(/2,3,4/) |