program readFile

!! Use stream I/O implemented in f95
 !integer, parameter :: dp = selected_real_kind(15, 307)
 integer, parameter :: dp = selected_real_kind(15)

 real(kind=dp) :: Lx, Ly
 integer :: Nlx, Nly
 real(kind=dp) :: gama

 real(kind=dp) :: Rx, Ry, radius, temp
 integer :: row, col, id
 
 integer :: i

 open(file="P0.700000id1.d1", unit=8, access="stream",form="unformatted")
 read(8) Lx, Ly, Nlx, Nly, gama 

 print *, Lx, Ly, Nlx, Nly, gama

 DO i = 1,5
  read(8) Rx, Ry, radius, temp 
  read(8) row, col
  print *, Rx, Ry, radius
 END DO

 close(8)
end
