diff options
author | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2016-09-22 20:24:35 (GMT) |
---|---|---|
committer | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2016-09-22 20:24:35 (GMT) |
commit | 3c37126585bbb2f788d6a71449ffbb61efc5141f (patch) | |
tree | 0e7b26955f2a7ee1d59be28ab50271fde082b1c2 /hl/fortran/test | |
parent | 362233bd452ea7997b5961a753ebd8be3876e64f (diff) | |
download | hdf5-3c37126585bbb2f788d6a71449ffbb61efc5141f.zip hdf5-3c37126585bbb2f788d6a71449ffbb61efc5141f.tar.gz hdf5-3c37126585bbb2f788d6a71449ffbb61efc5141f.tar.bz2 |
Removed the use of hard-coded integer KINDs.
Diffstat (limited to 'hl/fortran/test')
-rw-r--r-- | hl/fortran/test/tsttable.F90 | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/hl/fortran/test/tsttable.F90 b/hl/fortran/test/tsttable.F90 index 62d291f..bffbb03 100644 --- a/hl/fortran/test/tsttable.F90 +++ b/hl/fortran/test/tsttable.F90 @@ -185,7 +185,7 @@ SUBROUTINE test_table1() ! make table !------------------------------------------------------------------------- - test_txt = " Make table" + test_txt = "Make table" CALL test_begin(test_txt) CALL h5tbmake_table_f(dsetname1,& @@ -508,7 +508,6 @@ SUBROUTINE test_table1() WRITE(*,'(/,5X,"H5TBGET_FIELD_INFO_F: RETURN ERROR")') STOP ENDIF - ! "field4abc" was deleted and "field5" was added. field_names(4) = "field5" @@ -538,7 +537,6 @@ SUBROUTINE test_table1() ! CALL h5fclose_f(file_id, errcode) - ! ! end function. ! @@ -557,15 +555,15 @@ SUBROUTINE test_table2() IMPLICIT NONE - INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(9) !should map to INTEGER*4 on most modern processors - INTEGER, PARAMETER :: int_kind_16 = SELECTED_INT_KIND(9) ! (18) !should map to INTEGER*8 on most modern processors + INTEGER, PARAMETER :: i8 = SELECTED_INT_KIND(9) !should map to INTEGER*4 on most modern processors + INTEGER, PARAMETER :: i16 = SELECTED_INT_KIND(9) ! (18) !should map to INTEGER*8 on most modern processors INTEGER, PARAMETER :: sp = SELECTED_REAL_KIND(5) ! This should map to REAL*4 on most modern processors INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(10) ! This should map to REAL*8 on most modern processors TYPE particle_t CHARACTER(LEN=11) :: name - INTEGER(KIND=int_kind_8) :: lati - INTEGER(KIND=int_kind_16) :: long + INTEGER(KIND=i8) :: lati + INTEGER(KIND=i16) :: long REAL(KIND=sp) :: pressure REAL(KIND=dp) :: temperature END TYPE particle_t @@ -607,23 +605,23 @@ SUBROUTINE test_table2() test_txt = "Testing H5TBread_table_f and H5TBmake_table_f (F2003)" CALL test_begin(test_txt) + ! Define an array of Particles p_data(1:nrecords) = (/ & - particle_t("zero ",0_int_kind_8,0_int_kind_16,0.0_sp,0.0_dp), & - particle_t("one ",10_int_kind_8,10_int_kind_16,10.0_sp,10.0_dp), & - particle_t("two ",20_int_kind_8,20_int_kind_16,20.0_sp,20.0_dp), & - particle_t("three ",30_int_kind_8,30_int_kind_16,30.0_sp,30.0_dp),& - particle_t("four ",40_int_kind_8,40_int_kind_16,40.0_sp,40.0_dp), & - particle_t("five ",50_int_kind_8,50_int_kind_16,50.0_sp,50.0_dp), & - particle_t("six ",60_int_kind_8,60_int_kind_16,60.0_sp,60.0_dp), & - particle_t("seven ",70_int_kind_8,70_int_kind_16,70.0_sp,70.0_dp) & + particle_t("zero ",0_i8,0_i16,0.0_sp,0.0_dp), & + particle_t("one ",10_i8,10_i16,10.0_sp,10.0_dp), & + particle_t("two ",20_i8,20_i16,20.0_sp,20.0_dp), & + particle_t("three ",30_i8,30_i16,30.0_sp,30.0_dp),& + particle_t("four ",40_i8,40_i16,40.0_sp,40.0_dp), & + particle_t("five ",50_i8,50_i16,50.0_sp,50.0_dp), & + particle_t("six ",60_i8,60_i16,60.0_sp,60.0_dp), & + particle_t("seven ",70_i8,70_i16,70.0_sp,70.0_dp) & /) - fill_data(1:nrecords) = particle_t("no data",-1_int_kind_8, -2_int_kind_16, -99.0_sp, -100.0_dp) + fill_data(1:nrecords) = particle_t("no data",-1_i8, -2_i16, -99.0_sp, -100.0_dp) compress = 0 - dst_size = H5OFFSETOF(C_LOC(dst_buf(1)), C_LOC(dst_buf(2))) #ifdef H5_FORTRAN_HAVE_STORAGE_SIZE |