For Programmers: Free Programming Magazines  


Home > Archive > Fortran > December 2005 > end of file error when reading text files









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author end of file error when reading text files
cfox

2005-12-17, 7:49 am

Hi

I am trying to create and read a text file in fortran 90
the file is created ok and just contains some numbers for now
but when I try to read it back in I get a run time error
and
attempt to read past end of file
how do I read the file back in
the code I'm using is below

Cheers

CHRIS

open (55,file='output.txt',form='FORMATTED')
WRITE(55,*) anat
close(55)

open (56,file='output.txt',form='FORMATTED')
READ (56) anatomyNumbers
close(56)
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com