File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ contains
125125 character(len=*), intent(in), optional :: fmt
126126 character(len=1), intent(in), optional :: delimiter
127127 character(len=:), allocatable :: fmt_
128+ character(len=1) :: delimiter_
128129 !!
129130 !! Example
130131 !! -------
@@ -148,6 +149,7 @@ contains
148149
149150 skiprows_ = max(optval(skiprows, 0), 0)
150151 max_rows_ = optval(max_rows, -1)
152+ delimiter_ = optval(delimiter, " ")
151153
152154 s = open(filename)
153155
@@ -158,11 +160,9 @@ contains
158160
159161 ! determine number of columns
160162 ncol = 0
161- if ( skiprows_ < nrow ) ncol = number_of_columns(s, skiprows=skiprows_, delimiter=delimiter )
163+ if ( skiprows_ < nrow ) ncol = number_of_columns(s, skiprows=skiprows_, delimiter=delimiter_ )
162164 #:if 'complex' in t1
163- if (present(delimiter)) then
164- if (is_blank(delimiter)) ncol = ncol / 2
165- end if
165+ if (is_blank(delimiter_)) ncol = ncol / 2
166166 #:endif
167167
168168 allocate(d(max_rows_, ncol))
You can’t perform that action at this time.
0 commit comments