[net.lang.ada] Fortran-77/Ada

MFELDMAN@GWUVM.BITNET (Mike Feldman) (05/21/86)

I'm not absolutely sure about of the truly esoteric stuff in
Fortran-77, but some fairly obvious stuff comes to mind. You asked
about "features" in Fortran-77 not easily simulated in Ada.
I don't know whether you're trying to do an automatic (or nearly)
translation or a manual re-coding, but Fortranners often do
tricks that might not be obvious to a source-to-source translator.
The most obvious is the use of EQUIVALENCE statements to alias
storage to different storage structures or different types.
This could probably be handled by using unchecked conversion in Ada,
but I wouldn't like to attempt it for the general case of this trick.
We're talking about what the C world calls a "union" of different
types on top of a single chunk of memory.

Run-of-the mill Fortran code should be able to be mapped without too
much trouble to Ada, except for the tricky stuff such as that above.
Watch out for the CHARACTER type in Fortran-77; you need a decent
dynamic string package in Ada to handle that.

Another thing to watch out for is that Fortranners often take advantage
of their knowing that multi-dimensional arrays are mapped "column major",
and do tricks accordingly; storage mapping for such things is NOT
defined in the ALRM; it is implementation-dependent, but most compilers
seem to do it row-major, a la PL/1 or Pascal.

All you in Info-Ada land: have I missed anything big?

Mike Feldman
Dept. of EE&CS
George Washington University
Washington, DC 20052