- #1
yancee
- 5
- 0
I was looking for a fortran code wherein the stored file in DAT file will be stored once I run the program again. My program is just replacing the saved file.
What you wrote is not clear. What are you asking?I was looking for a fortran code wherein the stored file in DAT file will be stored once I run the program again. My program is just replacing the saved file.
Anna
Abby
Ammy <- end of file is here
Program database
integer reason
character (len=30):: name, a,b,c
open (unit=13, file='rw.dat', status='old', action='readwrite')
do
read(13,'(a)',iostat=reason) a
if (reason < 0) exit
end do
[b][COLOR="Red"]write(13,*)[/COLOR][/b]
print*, 'Input name'
read*, name
write(13,'(a)',[b][COLOR="red"]advance='no'[/COLOR][/b]) name
close (unit=13)
End program
Anna
Abby
Ammy
<- end of file is here
Program database
integer reason
character (len=30):: name, a,b,c
open (unit=13, file='rw.dat', status='old', action='readwrite')
do
read(13,'(a)',iostat=reason) a
if (reason < 0) exit
end do
print*, 'Input name'
read*, name
write(13,'(a)') name
close (unit=13)
End program