program hello
implicit none
character(len=255):: src
real(kind=4):: a(13)
a=0.0E0
src = "20.332 12.1 0.063 429.0 "
!! Not enough data
!read(src, *)a
!! 4 float number in src
read(src, *)a(1:4)
write(*, *)"a = ", a
end program Hello
If you open a unit that is already open without specifying a file name (or with the previous file name), FORTRAN thinks you are reopening the file to change parameters. The file position is not changed. The only parameters you are allowed to change are BLANK (NULL or ZERO) and FORM (FORMATTED or PRINT). To change any other parameters, you must close, then reopen the file.