🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

4 total messages Started by Ben Aveling Mon, 12 Oct 1992 11:28
Output conversion warnings in Vax Fortran
#141
Author: Ben Aveling
Date: Mon, 12 Oct 1992 11:28
7 lines
867 bytes
I'm sure anyone who has ever used Fortran has seen the ***** type output
when a number is too big to fit in it's format statement.  My gripe is
that every time my programs do that, it counts as a warning, and does a
stack dump.  Can some kind soul please tell me how I can stop this
happening, short of turning off all messages.

	Ben
Re: Output conversion warnings in Vax Fortran
#149
Author: Terry Poot
Date: Mon, 12 Oct 1992 18:25
23 lines
1863 bytes
In article <1992Oct12.112837.18130@monu6.cc.monash.edu.au>,
bena@yoyo.cc.monash.edu.au (Ben Aveling) writes:
>I'm sure anyone who has ever used Fortran has seen the ***** type output
>when a number is too big to fit in it's format statement.  My gripe is
>that every time my programs do that, it counts as a warning, and does a
>stack dump.  Can some kind soul please tell me how I can stop this
>happening, short of turning off all messages.

This probably isn't the answer you wanted, since it involves editting your
source (presumably a lot of it) but if there is an iostat=<xx> specifier in your
I/O statement, the stack dump won't appear.

I suppose the correct solution that doesn't involve changing your I/O statements
would be to provide a condition handler that checked for that specific condition
and resignalled all others. I'd imagine you could put such a condition handler
on your main program. I expect it is the default condition handler that produces
the stack dump. If it's one down in the FORTRAN RTL, then this won't work, and
you'll have to use IOSTAT.
--
Terry Poot <tp@mccall.com>                   The McCall Pattern Company
(uucp: ...!rutgers!depot!mccall!tp)          615 McCall Road
(800)255-2762, in KS (913)776-4041           Manhattan, KS 66502, USA
Re: Output conversion warnings in Vax Fortran
#147
Author: fairfield
Date: Mon, 12 Oct 1992 20:13
22 lines
1448 bytes
In article <1992Oct12.112837.18130@monu6.cc.monash.edu.au>, bena@yoyo.cc.monash.edu.au (Ben Aveling) writes:
> I'm sure anyone who has ever used Fortran has seen the ***** type output
> when a number is too big to fit in it's format statement.  My gripe is
> that every time my programs do that, it counts as a warning, and does a
> stack dump.  Can some kind soul please tell me how I can stop this
> happening, short of turning off all messages.

Simply add the IOSTAT parameter to your WRITE statements and ignore the
value returned:

	INTEGER*4 OK
	...
	WRITE (6,801,IOSTAT=OK) X,Y,Z
	...

		Cheers, Ken
-- 
 Dr. Kenneth H. Fairfield    |  Internet: Fairfield@Slacvx.Slac.Stanford.Edu
 SLAC, P.O.Box 4349, MS 98   |  DECnet:   45537::FAIRFIELD (45537=SLACVX)
 Stanford, CA   94309        |  BITNET    Fairfield@Slacvx
 ----------------------------------------------------------------------------
 These opinions are mine, not SLAC's, Stanford's, nor the DOE's...
Re: Output conversion warnings in Vax Fortran
#159
Author: engelhardt
Date: Tue, 13 Oct 1992 08:25
50 lines
2247 bytes
In article <1992Oct12.112837.18130@monu6.cc.monash.edu.au>,
bena@yoyo.cc.monash.edu.au (Ben Aveling) writes:
> I'm sure anyone who has ever used Fortran has seen the ***** type output
> when a number is too big to fit in it's format statement.  My gripe is
> that every time my programs do that, it counts as a warning, and does a
> stack dump.  Can some kind soul please tell me how I can stop this
> happening, short of turning off all messages.
> 
> 	Ben

Yes, it's a pain isn't it? But you can use LIB$ESTABLISH to get rid of the
messages. Below my signature is a quick and (rather) dirty example that 
should point you in the right direction.

        --- Allan


Allan Engelhardt           | Internet:     Allan.Engelhardt@nbi.dk
Niels Bohr Institute       | HEPnet:       NBIVAX::ENGELHARDT
Blegdamsvej 17             | Bitnet/EARN:  ENGELH at CERNVM
DK-2100 Copenhagen         | Phone direct: (+45)31424284<dial-tone>355
DENMARK                    | Fax:          (+45)31421016

---
      PROGRAM TEST
      REAL R1,R2,R3                 ! These three lines are
      VOLATILE R1,R2,R3             ! used to generate an error
      DATA R2 /1./ , R3 /0./        ! that is not a format error.
      INTEGER*4 HANDLR
      EXTERNAL HANDLR
      CALL LIB$ESTABLISH(HANDLR)    ! This is the trick.
      I = 100
      DO 10 J = 1 , 4
        WRITE(*,1000) I
        I = I*10                    ! J=4 will give a format error.
   10 CONTINUE
      R1=R2/R3                      ! Floating divide zero.
 1000 FORMAT( 1X,'Number is ',I5 )
      END

      INTEGER*4 FUNCTION HANDLR(S,M)
      INTEGER*4 S(*),M(5)
      INCLUDE '($SSDEF)'
      IF ( S(2).EQ.1606138 ) THEN   ! I *said* dirty :-}
        HANDLR = SS$_CONTINUE
      ELSE
        HANDLR = SS$_RESIGNAL
      ENDIF
      RETURN
      END
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads