I am writing a FORTRAN program that reads data from a text file and writing it to the console. the data file looks something like this
1234567890123456 12345
It is usually better to read data in non fixed format. And to leave some leading spaces so that numbers can fit when writing them out.
integer(8) :: i real(4) :: x, y, z open(unit=1, file='data.txt') read(1,*)i, x, y, z write(*,'(i16, 3f11.3)')i, x, y, z end