Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* forrtl ignores errors from "write(unit,*)"
@ 1996-02-02  5:00 Mark Bartelt
  1996-02-05  5:00 ` Steve Lionel
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Bartelt @ 1996-02-02  5:00 UTC (permalink / raw)


Is the following a bug, misfeature, or intentional design decision?
Here are three trivial Fortran programs:

-------------------------------------------------------------------
        open(1,name='foo.bar',type='new')
100     write (1,111)
111     format ('hello, world')
        go to 100
        end
-------------------------------------------------------------------
        open(1,name='foo.bar',type='new')
100     write (1,*,err=99) 'hello, world'
        go to 100
99      write (6,*) 'bye'
        end
-------------------------------------------------------------------
        open(1,name='foo.bar',type='new')
100     write (1,*) 'hello, world'
        go to 100
        end
-------------------------------------------------------------------

Suppose, for example, the write() fails because a filesystem is full.
With the first program, the Fortran runtime system catches the error,
and aborts as one would hope:

/home: write failed, file system is full
forrtl: No space left on device
forrtl: severe (38): error during write, unit 1, file /home/sysmark/foo.bar

In the second example, control transfers to the specified "err=" line:

/home: write failed, file system is full
 bye

But in the third example, the program loops forever, emitting zillions
of "/home: write failed, file system is full" messages.

Oughtn't an error in a "write(unit,*)" statement, where no "err=" has
been specified, cause an abort in the same manner as "write(unit,fmt)"
does?

"DEC Fortran V3.8 for OSF/1 AXP Systems" is the version we're running.

Mark Bartelt                                             416/978-5619
Canadian Institute for                          mark@cita.toronto.edu
Theoretical Astrophysics                        mark@cita.utoronto.ca

"Nur eine Waffel taugt!"      --      Parsifal, in an Eggo commercial



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: forrtl ignores errors from "write(unit,*)"
  1996-02-02  5:00 forrtl ignores errors from "write(unit,*)" Mark Bartelt
@ 1996-02-05  5:00 ` Steve Lionel
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Lionel @ 1996-02-05  5:00 UTC (permalink / raw)



In article <DM5JsE.5M7@info.physics.utoronto.ca>, 
sysmark@helios.physics.utoronto.ca (Mark Bartelt) writes:
|>Is the following a bug, misfeature, or intentional design decision?
|>Here are three trivial Fortran programs:
[snip]
|>
|>Suppose, for example, the write() fails because a filesystem is full.
|>With the first program, the Fortran runtime system catches the error,
|>and aborts as one would hope:
|>
|>/home: write failed, file system is full
|>forrtl: No space left on device
|>forrtl: severe (38): error during write, unit 1, file /home/sysmark/foo.bar
|>
|>But in the third example, the program loops forever, emitting zillions
|>of "/home: write failed, file system is full" messages.
|>
|>Oughtn't an error in a "write(unit,*)" statement, where no "err=" has
|>been specified, cause an abort in the same manner as "write(unit,fmt)"
|>does?

Yes, it should.  We recently identified a bug in the RTL that causes this
behavior - expect to see it corrected in the RTL that ships with the next
version of DEC Fortran. 
-- 

Steve Lionel                      Mail: lionel@quark.enet.dec.com
Fortran Development               WWW:  http://www.digital.com/info/slionel.html
Digital Equipment Corporation     CompuServe: 75263,3001
110 Spit Brook Road, ZKO2-3/N30
Nashua, NH 03062-2698             "Free advice is worth every cent"

For information on Digital Fortran 90, see http://www.digital.com/info/hpc/f90/



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-02-05  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-02-02  5:00 forrtl ignores errors from "write(unit,*)" Mark Bartelt
1996-02-05  5:00 ` Steve Lionel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox