From: Myron on
I've recently been forced to change from g77 to g95, and
g95 flags declaration statements which contain initialization values,
such as
INTEGER x/5/
to be errors. Is there a compile-time option I can use to
cause this to NOT be an error?
--Myron
From: dpb on
Myron wrote:
> I've recently been forced to change from g77 to g95, and
> g95 flags declaration statements which contain initialization values,
> such as
> INTEGER x/5/
> to be errors. Is there a compile-time option I can use to
> cause this to NOT be an error?

Not sure about the switch but the /val/ syntax was a vendor-specific
extension anyway iirc...

--

From: Richard Maine on
dpb <none(a)non.net> wrote:

> Myron wrote:
> > I've recently been forced to change from g77 to g95, and
> > g95 flags declaration statements which contain initialization values,
> > such as
> > INTEGER x/5/
> > to be errors. Is there a compile-time option I can use to
> > cause this to NOT be an error?
>
> Not sure about the switch but the /val/ syntax was a vendor-specific
> extension anyway iirc...

Why would g95 necessarily be compatible with every nonstandard feature
of g77? It isn't as though there is any relationship between g77 and
g95. G95 was a completely independent compiler - not a development based
on g77. Even the term "downward compatible" is a bit misleading here in
that it implies a relationship that doesn't exist.

G95 accepts Fortran 77 code. I'm trying to recall if there might have
been some obscure feature that it omitted. I was thinking perhaps there
was one, but I forget what it was and I might misrecall anyway. But you
can't count on it accepting random nonstandard features from every f77
compiler that ever was (and no, g77 doesn't have a special role - see
first para above).

I don't have the answer about a possible special switch either. I could
try to go look it up in the docs on the g95 web page, but then I've got
no particular advantage over the OP in doing that. In case he doesn't
happen to know, the g95 web page is at www.g95.org.

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
From: James Van Buskirk on
"Myron" <mcalhoun(a)ksu.edu> wrote in message
news:eeb4e965-d5d2-4881-94dc-a706b56ca6f7(a)n7g2000yqb.googlegroups.com...

> I've recently been forced to change from g77 to g95, and
> g95 flags declaration statements which contain initialization values,
> such as
> INTEGER x/5/
> to be errors. Is there a compile-time option I can use to
> cause this to NOT be an error?

gfortran tries to be more accommodating to g77 code than does g95:

C:\gfortran\clf\f77_example>type f77_example.for
INTEGER X /5/
WRITE(*,*) X
END

C:\gfortran\clf\f77_example>gfortran f77_example.for -of77_example

C:\gfortran\clf\f77_example>f77_example
5

--
write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, &
6.0134700243160014d-154/),(/'x'/)); end


From: Ron Shepard on
In article <hjgh40$r8d$1(a)news.eternal-september.org>,
dpb <none(a)non.net> wrote:

> Myron wrote:
> > I've recently been forced to change from g77 to g95, and
> > g95 flags declaration statements which contain initialization values,
> > such as
> > INTEGER x/5/
> > to be errors. Is there a compile-time option I can use to
> > cause this to NOT be an error?
>
> Not sure about the switch but the /val/ syntax was a vendor-specific
> extension anyway iirc...

There are several ways to fix this syntax error in the source code.
The easiest is probably

integer :: x=5

Anyone know of one of the source code converter/maintenance tools
that would do this automatically?

$.02 -Ron Shepard
 |  Next  |  Last
Pages: 1 2
Prev: errata list
Next: select specified columns in ch. array