From: glen herrmannsfeldt on
James Van Buskirk <not_valid(a)comcast.net> wrote:
> "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

Interestingly when I read the above in my news reader there are
no slashes around the 5. The slashes in the signature are there.

I knew this feature back to OS/360 Fortran IV, but it must be
used carefully. In a DATA statement you can say:

DATA x,y,z/1.,2.,3./

but, as I remember it, you can't say:

REAL x,y,z/1.,2.,3./

to initialize three variables.

It would seem fairly easy to automate the conversion to DATA
statements, but I don't know that anyone has done it.

-- glen
From: robin 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?

Yes, it's g77.

Seriously, your statement isn't standard Fortran.
Just standardise it.


From: Beliavsky on
On Jan 23, 11:51 pm, nos...(a)see.signature (Richard Maine) wrote:

<snip>

> 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.

The F77 feature not in G95 is real-valued do loop variables, I
believe.