www.delorie.com/djgpp/bugs/show.cgi   search  
Bug 000331

When Created: 11/24/2000 04:18:00
Against DJGPP version: 2.03
By whom: henlich@mmers1.mw.tu-dresden.de
Abstract: Fortran: read/write operations on a file do not work properly
The following program does not work properly:
===
      program test

      integer un

      un = 11
      open (un, file='test.txt')

      read (un,*)
      write (un, '(A)', ERR = 30) '2'

      goto 40

 30   print *,'Error'

 40   close (un)
      end
===

If the file test.txt consists of the 2 lines:
===
one
two
===

it should be after running the program 'test':
===
one
2
===

instead it is:
===
one
t
===

Note added: 11/24/2000 11:17:39
By whom: eliz@is.elta.co.il
This is not a DJGPP problem, it is something with the Fortran libraries.
(I'm also not sure whether the Fortran 77 Standard allows to do this.)

I'm closing this report.

Closed on 11/24/2000 11:19:22: Not a problem in DJGPP.
By whom: eliz@is.elta.co.il



  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2010   by DJ Delorie     Updated Jul 2010