1752762 Members
5048 Online
108789 Solutions
New Discussion юеВ

Re: Fortran Compiler

 
SOLVED
Go to solution
Pierluigi Cecchi
Occasional Contributor

Fortran Compiler

Hi

A customer has received a RP3440 with HP-UX 11.23.
He needed Fortran 77, but the compiler preinstalled was f90.

He needs to know if it's possible to use f90 as f77 compiler, and if so, in which way.

Many thanks in advance for your help.

Pierluigi Cecchi
5 REPLIES 5
Pete Randall
Outstanding Contributor
Solution

Re: Fortran Compiler

You might try compiling with the +U77 option.


Pete

Pete
Steven Schweda
Honored Contributor

Re: Fortran Compiler

> [...] the compiler preinstalled was f90.

Not exactly the precise version. I gather
that these might say something serious:

what /opt/fortran90/bin/f90
f90 +version

I know nothing, but a quick Google search for
hp-ux fortran
led to a bunch of useful stuff.

http://h21007.www2.hp.com/portal/site/dspp/PAGE.template/page.document?ciid=c4080f1bace021100f1bace02110275d6e10RCRD

http://docs.hp.com/en/B3909-90002/index.html

Look for "77".

Fortran is FORTRAN, isn't it?
Dennis Handly
Acclaimed Contributor

Re: Fortran Compiler

>if it's possible to use f90 as f77 compiler, and if so, in which way.

I'm not sure. You could just use f90. And if problems, look at f90(1) for "77" and select those individual options.

>Steven: Fortran is FORTRAN, isn't it?

Not sure your point?
All Fortrans are alike? :-)
Or Fortran should be spelled FORTRAN?
The last thing I heard was they gave up and that Fortran is Standard.
http://www.nag.co.uk/SC22WG5/

And before I abandoned COBOL, it was still spelled COBOL.
http://www.cobolstandard.info/wg4/wg4.html
OldSchool
Honored Contributor

Re: Fortran Compiler

I believe you will find the f90 compiler supports 77 syntax as well as f90, although there are significant differences in the compiler directives (see the link Steven pointed out above).

the docs *seem* to suggest that it may be as simple as the extension on the source file, with .f or .F being f77 syntax, and .f90 being fortran 90.
Steven Schweda
Honored Contributor

Re: Fortran Compiler

> I believe you will find [...]

I haven't done any serious work with Fortran
since it was FORTRAN (and '77 was the new
thing), so I know nothing, but I had the
vague impression that all (or almost all) of
the old syntax was still legal, so that a new
compiler would (generally) be able to
tolerate old code.

It should be easy enough to run the
experiment.

A few pieces of old (simple) Fortran code
which I can find lying around on my VMS
system seem to go though the newer Fortran 90
compiler there ("the HP Fortran (formerly the
Compaq Fortran 90) compiler").