From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,4ae64569d850ad11,start X-Google-Attributes: gid1164f8,public X-Google-Thread: fee84,4ae64569d850ad11,start X-Google-Attributes: gidfee84,public From: sysmark@helios.physics.utoronto.ca (Mark Bartelt) Subject: forrtl ignores errors from "write(unit,*)" Date: 1996/02/02 Message-ID: #1/1 X-Deja-AN: 137881247 sender: news@info.physics.utoronto.ca (System Administrator) organization: Canadian Institute for Theoretical Astrophysics reply-to: mark@cita.utoronto.ca newsgroups: comp.unix.osf.osf1,comp.sys.dec 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