Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

subroutine problem

Status
Not open for further replies.

milenko76

Technical User
Mar 26, 2010
100
PT
I have iterative process but my subroutine has problems.
c ======================================
subroutine datainpe
c ======================================
use definitions
use mt2ddat
implicit none

write(*,*)iper
id1=iper/10
id2=iper-id1*10
dfile(3:4)=char(id1+48)//char(id2+48)
open(209, file=dfile, form='formatted',status='unknown')
read(209,*)data1,data2

end subroutine
It starts from iper 0,though the loop in the main starts from 1.
1
0
forrtl: severe (24): end-of-file during read, unit 209, file /home/milenko/ircg8/em00.datai
How to change this?
 
Where is iper defined? Is it at module level?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top