Problème 'end-of-file during read, unit 1'
Bonsoir!
je viens de taper un programme cense etre simple mais je rencontre un probleme. Ca marche a la compilation mais a l'execution, j'ai un ' end-of-file during read, unit 1'. D'ou cela pourrait-il venir? Le fichier rleo_q_01.out est un fichier texte ASCII tres long.
merci de votre aide
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
program snr
integer :: j,taille
character(5) :: m
character, dimension(:), allocatable :: a
! character(99) :: inputfile
!type *,'inputfile :'
!read (*,'(a30)') inputfile
OPEN (UNIT =1,FILE ='rleo_q_01.out',form='formatted',status="old",action='read')
taille=0
do
read (1,'(a5)',end=100) m
taille=taille+1
end do
100 continue
print *,taille
allocate (a(taille))
do j=1,taille
read (1,'(a5)') a(j)
end do
OPEN (UNIT =2,FILE ='resultat_snr',form='formatted',status="new",action="write")
write (2,'(a5)') a
end program snr |