On Wed, 22 Sep 2004, Catherine Moroney wrote:
> A question on a different topic - how much Fortran90 understanding
> does the current version of the g77 compiler have?
The answer is not all that much. I have written a document on it which I
thought might be on my website, but isn't (I'll fix that some time). In
summary, the support for Fortran90 in g77 is limited to:
Free-format source code, e.g. & at end of incomplete line
(if the switch -ffree-form is used)
Multiple statements on a line (with ";" as the separator).
Symbolic names can be up to 31-characters long, can contain lower-case
letters (equivalent to upper-case) and underscores.
End-of-line comments may be used starting with ! (but ! must not be
in column 6 with fixed-format source-code).
Relational operators > >= < <= == /= can be used instead of .GT. etc.
Character constants can use "double" or 'single' quotes.
Program unit names permitted on END, e.g. END SUBROUTINE MYSUB.
IMPLICIT NONE (to flag non-explicit data types in a program unit).
INCLUDE 'filename'
Type declarations may use KIND values (but this is of limited use because
kind-selection functions are not yet provided).
Initial values on type declarations of scalars (not arrays), e.g.
REAL :: value = 1.234567
Zero-length strings are valid, e.g. ""
Substrings of character constants are permitted.
Automatic arrays (a form of dynamic storage within subprograms).
DO without labels and END DO are permitted, also indefinite DO (but a
conditional EXIT or STOP is obviously needed in such loops).
DO WHILE(logical expression) with END DO is permitted.
EXIT and CYCLE are allowed in DO loops.
SELECT CASE structure is supported but only with integer/logical
selectors.
Construct names are allowed with IF/DO/CYCLE/EXIT/SELECT CASE.
Character intrinsic functions ACHAR, IACHAR, and LEN_TRIM are provided.
Bit-wise integer functions BTEST, IAND, IBCLR, IBITS, IBSET, IEOR, IOR,
ISHFT, ISHFT, MVBITS, NOT (the MIL-STD 1753 intrinsics) are provided.
OPEN with STATUS='REPLACE' is supported.
NAMELIST input/output is also supported.
=============================
But if you need significant Fortran90 functionality I'm not sure that g77
is the right thing to use. Have you looked at g95, www.g95.org, which
seems to have just about all the functionality right now. It's status is
that of a beta release, but seems to be advancing rapidly. You could try
it right now, and it might be ready for serious use before long.
--
Clive Page,
Dept of Physics & Astronomy,
University of Leicester, U.K.
|