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!

ERROR IN INPUT DATA FROM FILE

Status
Not open for further replies.

baharengineer

Programmer
Jul 9, 2010
42
IR
hi

i load input data from text files...

please check this instructions and tell me why this line has error?

open (unit=1, file='data5.txt',
* action='READ', status='OLD', iostat=rtn)
read (unit=1, end=104, fmt=904, iostat=rtn)
* (MOP)//has error
104 continue
open (unit=1, file='data6.txt',
* action='READ', status='OLD', iostat=rtn)
read (unit=1, end=105, fmt=904, iostat=rtn)
* (MIP)//has error

and etc.

and there is some line like these! and every of this specified line has error

the errors is like this:
error FOR3852: syntax error detected between MOP and )
error FOR3852: syntax error detected between MIP and )

how can i fix these errors?

thanks for your answer!
 
instead of
Code:
read (unit=1, end=104, fmt=904, iostat=rtn) (MOP)
try
Code:
read (unit=1, end=104, fmt=904, iostat=rtn) MOP
with MIP the same.
And what is //has error? If it's in your code then this is a syntax error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top