Skip to content

Commit c15a1c0

Browse files
committed
minor formatting change.
1 parent bc41acf commit c15a1c0

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/csv_module.f90

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -868,8 +868,8 @@ pure subroutine split(str,token,chunk_size,vals)
868868
integer,intent(in) :: chunk_size !! for expanding vectors
869869
type(csv_string),dimension(:),allocatable,intent(out) :: vals
870870

871-
integer :: i !!
872-
integer :: len_str !!
871+
integer :: i
872+
integer :: len_str
873873
integer :: len_token !! length of the token
874874
integer :: n_tokens !! number of tokens
875875
integer :: i1 !! index
@@ -886,13 +886,13 @@ pure subroutine split(str,token,chunk_size,vals)
886886

887887
!first, count the number of times the token appears in the string
888888
do
889-
len_str = len(temp) ! length of the string
890-
i = index(temp,token) ! location of the next token
891-
if (i<=0) exit ! no more tokens found
889+
len_str = len(temp) ! length of the string
890+
i = index(temp,token) ! location of the next token
891+
if (i<=0) exit ! no more tokens found
892892
call expand_vector(itokens,n_tokens,chunk_size,i+j) ! save the token location
893-
if (i+len_token>len_str) exit ! if the last bit of the string is a token
894-
j = j + i
895-
temp = temp(i+len_token:len_str) !remove previously scanned part of string
893+
if (i+len_token>len_str) exit ! if the last bit of the string is a token
894+
j = j + i
895+
temp = temp(i+len_token:len_str) !remove previously scanned part of string
896896
end do
897897
call expand_vector(itokens,n_tokens,chunk_size,finished=.true.) ! resize the vector
898898

@@ -905,9 +905,9 @@ pure subroutine split(str,token,chunk_size,vals)
905905
i1 = 1
906906
i2 = itokens(1)-1
907907
if (n_tokens>1) then
908-
vals(1)%str = str(i1:i2)
908+
vals(1)%str = str(i1:i2)
909909
else
910-
vals(1)%str = '' !the first character is a token
910+
vals(1)%str = '' !the first character is a token
911911
end if
912912

913913
! 1 2 3
@@ -917,7 +917,7 @@ pure subroutine split(str,token,chunk_size,vals)
917917
i1 = itokens(i-1)+len_token
918918
i2 = itokens(i)-1
919919
if (i2>=i1) then
920-
vals(i)%str = str(i1:i2)
920+
vals(i)%str = str(i1:i2)
921921
else
922922
vals(i)%str = '' !empty element (e.g., 'abc,,def')
923923
end if
@@ -928,12 +928,12 @@ pure subroutine split(str,token,chunk_size,vals)
928928
if (itokens(n_tokens)+len_token<=len_str) then
929929
vals(n_tokens+1)%str = str(i1:i2)
930930
else
931-
vals(n_tokens+1)%str = '' !the last character was a token
931+
vals(n_tokens+1)%str = '' !the last character was a token
932932
end if
933933

934934
else
935-
!no tokens present, so just return the original string:
936-
vals(1)%str = str
935+
!no tokens present, so just return the original string:
936+
vals(1)%str = str
937937
end if
938938

939939
end subroutine split

0 commit comments

Comments
 (0)