Closed nakib closed 3 years ago
Thanks! Indeed.
My initial plan was to read into a dummy array, as you just suggested, (initialized to something remarkably crazy like -99999.99999) which has a maximum size equal to the size of the line-break free data of the 3rd line of the .fmt file. Then check whether the whole dummy array or just six elements has been filled by the read statement. This check will tell us whether a line-break exists in the file or not and then we can proceed accordingly.
Indeed your method is the simplest solution to the problem. Closing the issue. Thanks!
You can make a dummy array of the appropriate size and then replace read(1,*) with read(1,*) dummy_array(:)