This is not a very exciting problem or solution, but I shall post it anyway.
I was trying to read formatted data from a file like this:
I first tried the following:
integer :: myint(5)
real(kind = 10) :: myreal(5)
do i = 1,5
The I6 refers to the field width of the integer column. But alas, the output was this:
Oddly enough, everything was in order except that it would round powers from e-01 to e-09 up to E+001, and e-10 to e-19 became E+000 etc. Most odd. The solution was to change the format statement to skip the 2 blank spaces between the columns, which I had forgotten to do:
Simple really, but I don't know why it gives such a strange behaviour.