🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #1258

Re: FORTRAN I/O (Was: Lessons from Algol)

#1258
From: Jim Giles
Date: Fri, 04 May 1990 22:44
31 lines
1401 bytes
From article <1990May4.170754.18659@terminator.cc.umich.edu>, by rsc@merit.edu (Richard Conto):
> Using the IBM FORTRANVS compiler (which is supposed to be FORTRAN-77 with
> extensions) on the following program:
>       PROGRAM TESTIO
>       INTEGER I
>       REAL Q
>       DO 10 I=1,10
>         Q = SQRT(I*1.0)
> 10      WRITE(*,*) ' SQRT(',I,') is ',Q
>       END
> I got the following output:
> 
>  SQRT(1,) is 1.,
>  [...]
>  SQRT(10,) is 3.162277,

Your Fortran I/O library is broken.  The commas (and blanks) are allowed
to be inserted as value _separators_ - so the trailing comma on the each
line is wrong.  Furthermore:

ANSI X3.9-1978, page 13-16, line 14:
    Character constants produced are not delimited by
    apostrophes, are not preceded or followed by a value
    separator, ....

So, all the commas or spaces that your library inserted before,
After, or between character values are wrong.  In short, all the
commas in your example output are non-standard.  I'd complain to 
IBM if I were you :-).

J. Giles
Technical Details
Message-ID: <14359@lambda.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!yale!cmcl2!lanl!lambda!jlg
References: <1990May4.170754.18659@terminator.cc.umich.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!yale!cmcl2!lanl!lambda!jlg
From: jlg@lambda.UUCP (Jim Giles)
Newsgroups: comp.lang.misc
Subject: Re: FORTRAN I/O (Was: Lessons from Algol)
Message-ID: <14359@lambda.UUCP>
Date: 4 May 90 22:44:06 GMT
References: <1990May4.170754.18659@terminator.cc.umich.edu>
Lines: 31