Article View: comp.sys.sun
Article #14002Possible bug in Sun 4 FORTRAN I/O system
From: revans
Date: Tue, 27 Feb 1990 20:41
Date: Tue, 27 Feb 1990 20:41
39 lines
1930 bytes
1930 bytes
Yesterday, I posted a request for help with an obscure problem I've been
having in this area. As yet, I've had no response, but I have managed to
localise the problem to an interaction between the FORTRAN I/O system and
the system() subroutine. The following program exhibits the problem. I
have been told that the compiler is not the latest release, by the way.
Is this a known problem? Has Sun released a fix? Or is it a 'feature'?
c buggy.f Russ Evans 27-Feb-90
c demonstrates problem of interaction between the FORTRAN I/O
c rt-system and the 'system' call on Sun 4/280. As yet untested
c in other environments. An erroneous EOF is found on the input
c unit following the call to system. Contents of infile.dat and
c of the argument to system appear to be immaterial. Behaviour
c does not depend on choice of unit 10 for file input.
character record*80
character infile*15
parameter (infile = 'infile.dat')
integer i,system
open(unit=10, file=infile, status='OLD', err=901)
10 read(unit=10, fmt='(A)', err=902, end=903) record
write(unit=6, fmt='(A)') record
i=system('lpr junk')
goto 10
901 write(unit=6, fmt='(2A)') 'Failed to open ', infile
stop
902 stop 'Read error on unit 10'
903 stop 'End of file on unit 10'
end
Russ Evans, British Geological Survey, Edinburgh UK e_gs18@va.nmh.ac.uk
.. just visiting (and working hard) at UCSB ..
Technical Details
Message-ID:
<5345@brazos.Rice.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rice!sun-spots-requestShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rice!sun-spots-request From: revans@voodoo.ucsb.edu Newsgroups: comp.sys.sun Subject: Possible bug in Sun 4 FORTRAN I/O system Keywords: Miscellaneous Message-ID: <5345@brazos.Rice.edu> Date: 27 Feb 90 20:41:08 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 39 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 9, Issue 62, message 10