Skip to content

Commit 2cc7bd2

Browse files
authored
small fix for loadtxt (fortran-lang#949)
2 parents 954a84b + 8f40163 commit 2cc7bd2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/stdlib_io.fypp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ contains
169169

170170
if (ios/=0) then
171171
write(msgout,1) trim(iomsg),i,trim(filename)
172+
1 format('loadtxt: error <',a,'> skipping line ',i0,' of ',a,'.')
172173
call error_stop(msg=trim(msgout))
173174
end if
174175

@@ -189,7 +190,7 @@ contains
189190
read (s,*,iostat=ios,iomsg=iomsg) d(i, :)
190191

191192
if (ios/=0) then
192-
write(msgout,1) trim(iomsg),size(d,2),i,trim(filename)
193+
write(msgout,2) trim(iomsg),size(d,2),i,trim(filename)
193194
call error_stop(msg=trim(msgout))
194195
end if
195196

@@ -200,7 +201,7 @@ contains
200201
read (s,fmt_,iostat=ios,iomsg=iomsg) d(i, :)
201202

202203
if (ios/=0) then
203-
write(msgout,1) trim(iomsg),size(d,2),i,trim(filename)
204+
write(msgout,2) trim(iomsg),size(d,2),i,trim(filename)
204205
call error_stop(msg=trim(msgout))
205206
end if
206207

@@ -209,7 +210,7 @@ contains
209210

210211
close(s)
211212

212-
1 format('loadtxt: error <',a,'> reading ',i0,' values from line ',i0,' of ',a,'.')
213+
2 format('loadtxt: error <',a,'> reading ',i0,' values from line ',i0,' of ',a,'.')
213214

214215
end subroutine loadtxt_${t1[0]}$${k1}$
215216
#:endfor

0 commit comments

Comments
 (0)