program main
  implicit none

  integer :: status
  real :: value

  open (10,file='data.txt')

  do
     read(10,*,iostat=status) value
     if (status == 0) then
        print*, value
     else
        exit
     end if
  end do

end program main
