Here I have the following csv-file:
and the following short Fortran program to handle "a problem":
I would like to achieve that variable dn will be filled with f.e. "test_001.txt" and di will be filled with f.e. "====== Def. 1 ======". In other words, the variables should be read up to an without the semikolon.
What do I need to do to achieve that.
Code:
test_001.txt;====== Def. 1 ======;====== ;Definition 1; ======
bedarf_0002.txt;====== ef ======;====== ;ef; ======
bedarf_0003.txt;====== Definition 3 ======;====== ;Definition 3; ======
bedarf_04.txt;====== Definition 4 ======;====== ;Definition 4; ======
bedarf_0005.txt;====== Test ======;====== ;Test; ======
bedarf_0006.txt;====== Definition 6 ======;====== ;Definition 6; ======
bedarf_0007.txt;====== Definition 7 ======;====== ;Definition 7; ======
bedarf_0008.txt;====== Definition 8 ======;====== ;Definition 8; ======
bedarf_0009.txt;====== Definition 9 ======;====== ;Definition 9; ======
Code:
program doku
character dn*16, di*26
open (3,file = 'datei.csv', status = 'old')
100 read (3,'(a15,1x,a)',end=1000) dn,di
open (4,file = dn,status='replace')
write (4,*) di
close(4)
goto 100
1000 end
I would like to achieve that variable dn will be filled with f.e. "test_001.txt" and di will be filled with f.e. "====== Def. 1 ======". In other words, the variables should be read up to an without the semikolon.
What do I need to do to achieve that.