@@ -433,6 +433,8 @@ end subroutine add_cell
433
433
! *****************************************************************************************
434
434
! >
435
435
! Add a vector to a CSV file. Each element is added as a cell to the current line.
436
+ !
437
+ ! @warning There is some bug here with GFortran 6.1 when `val` is a character string.
436
438
437
439
subroutine add_vector (me ,val ,int_fmt ,real_fmt ,trim_str )
438
440
@@ -652,7 +654,7 @@ pure elemental subroutine to_integer(str,val,status_ok)
652
654
653
655
integer :: istat ! ! read `iostat` error code
654
656
655
- read (str,fmt=* ,iostat= istat) val
657
+ read (str,fmt= default_int_fmt ,iostat= istat) val
656
658
if (istat== 0 ) then
657
659
status_ok = .true.
658
660
else
@@ -896,8 +898,6 @@ subroutine get_real_column(me,icol,r,status_ok)
896
898
real (wp),dimension (:),allocatable ,intent (out ) :: r
897
899
logical ,intent (out ) :: status_ok
898
900
899
- integer :: i ! ! counter
900
-
901
901
if (allocated (me% csv_data)) then
902
902
allocate (r(me% n_rows)) ! size the output vector
903
903
call me% get_column(icol,r,status_ok)
@@ -922,8 +922,6 @@ subroutine get_integer_column(me,icol,r,status_ok)
922
922
integer (ip),dimension (:),allocatable ,intent (out ) :: r
923
923
logical ,intent (out ) :: status_ok
924
924
925
- integer :: i ! ! counter
926
-
927
925
if (allocated (me% csv_data)) then
928
926
allocate (r(me% n_rows)) ! size the output vector
929
927
call me% get_column(icol,r,status_ok)
@@ -948,8 +946,6 @@ subroutine get_logical_column(me,icol,r,status_ok)
948
946
logical ,dimension (:),allocatable ,intent (out ) :: r
949
947
logical ,intent (out ) :: status_ok
950
948
951
- integer :: i ! ! counter
952
-
953
949
if (allocated (me% csv_data)) then
954
950
allocate (r(me% n_rows)) ! size the output vector
955
951
call me% get_column(icol,r,status_ok)
@@ -974,8 +970,6 @@ subroutine get_character_column(me,icol,r,status_ok)
974
970
character (len=* ),dimension (:),allocatable ,intent (out ) :: r
975
971
logical ,intent (out ) :: status_ok
976
972
977
- integer :: i ! ! counter
978
-
979
973
if (allocated (me% csv_data)) then
980
974
allocate (r(me% n_rows)) ! size the output vector
981
975
call me% get_column(icol,r,status_ok)
@@ -1000,8 +994,6 @@ subroutine get_csv_string_column(me,icol,r,status_ok)
1000
994
type (csv_string),dimension (:),allocatable ,intent (out ) :: r
1001
995
logical ,intent (out ) :: status_ok
1002
996
1003
- integer :: i ! ! counter
1004
-
1005
997
if (allocated (me% csv_data)) then
1006
998
allocate (r(me% n_rows)) ! size the output vector
1007
999
call me% get_column(icol,r,status_ok)
@@ -1164,7 +1156,6 @@ pure subroutine split(str,token,chunk_size,vals)
1164
1156
integer :: j ! ! counters
1165
1157
character (len= :),allocatable :: temp
1166
1158
integer ,dimension (:),allocatable :: itokens
1167
- logical :: finished ! ! if we are finished counting the tokens
1168
1159
1169
1160
temp = str ! make a copy of the string
1170
1161
len_token = len (token) ! length of the token
0 commit comments