fortran90 - Fortran runtime error 'Bad integer for item 3 in list input' -
i trying open existing file using open command. program compiles on execution error saying bad integer item 0 in list input. code i've used.
character*10,dimension(5) :: fn,ln integer, dimension(5) :: rno,class real, dimension(5) :: phy,chem,math,comp,eng real, dimension(5) :: tot,p open (10, file = 'sda', status = 'old') i=1,5,1 read(10,*),fn(i),ln(i),rno(i),class(i) read(10,*)phy(i),chem(i),math(i),comp(i),eng(i) end open(21, file = 'filen', status='new') write(21,*),'fname lname rno class' i=1,5,1 write(21,*),fn(i),ln(i),rno(i),class(i) end
file content
fname lname rno class alok tata 4531 12 samay soni 4532 12 arjun mani 4533 12 tatwa das 4534 12 bruce wayne 4535 12 phy che mat com eng 90. 90. 90. 80. 99. 80. 80. 80. 70. 80. 70. 60. 60. 70. 60. 60. 70. 80. 90. 90. 80. 80. 80. 80. 80.
Comments
Post a Comment