X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Newsgroups: comp.os.msdos.djgpp From: "Walter Dnes (delete the 'z' to get my real address)" Subject: Is there a list of error numbers for G77 ??? User-Agent: slrn/0.9.8.1pl1 (Linux) Date: 02 Aug 2009 21:43:25 GMT Lines: 40 Message-ID: <002418f0$0$4775$c3e8da3@news.astraweb.com> Organization: Unlimited download news at news.astraweb.com NNTP-Posting-Host: 556ecadb.news.astraweb.com X-Trace: DXC=B56J889R07LU8fT?_VL23KL?0kYOcDh AT JH^POnb=3f1ObnaYcUiel2M3N6:798G]MOJ>KK8ldfVfOA67n^Q2Hl^G=AU8U6db\?N To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com For obscure reasons (no flames please) I want to write a program in Fortran 77 code. Since the gnu gcc maintainers have abandoned F77, the only free choice seems to be DJGPP. I'm running it on linux, under dosemu 1.4.0.0, so it's effectively running under FreeDos. Since I downloaded gcc295.zip and g77-295b.zip, I assume I'm running DJGPP 2.95. Now for my question. I'm trying to read from a text file into a character string. I get error 103, which is really useless as far as debugging is concerned. Is there any list of error codes and English explanations thereof? I think the problem is that I'm trying to read a small text file, one line at a time, using a character * 255 variable. Here's a code snippet. It opens the file OK, but gets an error on the first read, i.e. it does not echo the first line of IDF_CONF.TXT program IDFSY000 implicit none integer iostaterror character * 255 inputline open(unit=21, status='OLD', file='IDF_CONF.TXT', blank='NULL', X access='SEQUENTIAL', iostat=iostaterror, err=32000) write(*,*) 'Sucessful open of IDF_CONF.TXT' do 1 read(unit=21, end=2, iostat=iostaterror, err=32001) inputline write(*,*) inputline 1 continue 2 continue close(unit=21, status='KEEP') stop 32000 write(*,*) ' Failed to open IDF_CONF.TXT ERROR ', iostaterror stop 32001 write(*,*) ' Error ', iostaterror, ' while reading IDF_CONF.TXT' stop end -- Walter Dnes; my email address is *ALMOST* like wzaltdnes AT waltdnes DOT org Delete the "z" to get my real address.