fortran structure support in gcc4 (on redhat linux 4)
Tobias Burnus
burnus@net-b.de
Wed Oct 18 17:43:00 GMT 2006
Hi,
dennis.p.kelly@census.gov wrote:
> I found a documented option that implies you can be using fortran95 or
> gfortran or a version that supports structures...
>
gfortran supports structures, namely "TYPE", but not "STUCTURE", which
is a DEC extension.
> [kelly004@ec2 progs]$ gcc4 -std=f95 y.f95
> In file y.f95:2
>
> STRUCTURE /s/
> 1
> Error: Unclassifiable statement at (1)
> In file y.f95:4
>
If I understood STRUCTURE correctly, it is the same as TYPE except that
the sequence is guaranteed. If this is the case, replace
STRUCTURE /s/
integer :: i
real :: r
END STRUCTURE
by the following ISO Fortran construct:
TYPE s
SEQUENCE ! This makes sure the order is kept
integer :: i
real :: i
END TYPE
Tobias
More information about the Fortran
mailing list