Re: Fortran 77 parser



In article
<SVPJj.139667$cQ1.130677@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"James Giles" <jamesgiles@xxxxxxxxxxxxxxxx> wrote:

The above comments may have been true for people using Crays and
nothing else. But when I started using Cray computers (about 1983),
I was concerned about portability of the code to a fairly wide range
of computers (including 60-bit CDCs, IBM mainframes, minicomputers
of various architectures, 36-bit DEC and Univac computers, attached
processors, etc.). In my situation, using real*8 declarations was
the best way to ensure portable code. Every compiler I used
supported those declarations, [...]

Except the CDC you mentioned. By then CDC was struggling.
Still, it wasn't inevitable that the ETA wouldn't pull the fat out
of the fire.

Or is it that there *was* a CDC compiler that made REAL*8
into a default 60-bit?

I thought they did by then, but my memory may be off, I agree that
in the 70's the CDC compilers did not support real*8 declarations.
I am more certain that the CDC Cyber and ETA machines did support
real*8 declarations, but I think they were actually byte addressable
(anyone remember?) and they had 64-bit floating point, so that makes
more sense.

(Eight whats?)

Most of the machines I listed above didn't really support eight of
anything with real*8 declarations, it was just an awkward way to
specifying floating point precision in a portable way. Dec-10,
Dec-20, and Univac computers were all word addressable with 36-bit
words, and their compilers accepted real*8 declarations to mean the
same as their double precision (which was 72-bit floating point).

The harris computers interpreted real*8 to be their 6-byte 48-bit
floating point.

The FPS processors supported 64-bit floating point, but they were
also word addressable, they did not really do byte addressing
either. On these machines, real*8 just meant 64-bit floating point,
there wasn't really eight of anything there either.

During this time, real*8 declarations were simply an awkward way of
specifying floating point precision, it did not mean eight of
anything. There should have been a better way of specifying
floating point precision (like parameter kinds in f90 and later),
but the ANSI committee was dragging its feet, so it never happened
in the decade of the 80's when all of this disparate hardware was
available and it when it would have been useful.

That does not mean that the vendors actually wanted you to use this
in their codes. In the 70's and 80's, the vendors are all into
getting you to support whatever features they could in order to get
you and your code locked into their hardware and software. Cray
*WANTED* you to just use REAL declarations for 64-bit floating point
because that would make it harder for you to move your code
elsewhere (VAX minicomputers, etc.). It was this vendor attitude,
and the influence they had over the ANSI standards committee, that
prevented any updates to f77 during the decade of the 1980's. The
vendors did not want to support anything at that time that would
make it easier for programmers to write efficient portable code,
whether it was vector syntax or real kind parameters.

And we still to this day do not really have a standard preprocessor
in common use, something else that has been essential to writing
efficient portable code since the 1970's. Yes, the C preprocessor
syntax is a de facto standard, but it is never going to be
standardized by the ANSI committee.

$.02 -Ron Shepard
.