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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems opening files

Status
Not open for further replies.

Truiteto

Technical User
Nov 24, 2004
2
ES
I have these files: D1.txt, D2.txt, D3.txt ..... D10.txt

My program is:

! Variables
integer i
character f(10)

! Body of Ej
data f/'1','2','3','4','5','6','7','8','9','10'/
Do i=1,10
open (i,file='D'//f(i)//'.txt')

My problem is when arriving to open D10.txt. I think there is a mistake because it reads as D1.txt

Can someone help me? Thank you very much
 
Change your declaration to
Code:
character*2 f(10)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top