--On Tuesday, August 31, 2004 11:39 AM -0400 Aleksandar Donev
<[log in to unmask]> wrote:
> g77 complains on this:
>
> integer, save :: profiler(2)=0
>
> I assume it is the combination of array and initialization it does not
> like. How do I do this in g77 in one line (I would like to avoid DATA
> if possible)? It does not have to be pure F77 as long as it compiles
> with g77.
I can't definitively tell you what g77 accepts. This is not standard
f77, as you know. But I see two things nonstandard here. One is a
trivial syntax extension of the kind that I'd find it quite
reasonable that f77 compilers might adopt - the entity-oriented
form of declaration.
The other non-f77 thing is huge and thus highly suspect. Whole-array
operations are a major f90 feature. I'm 100% sure that g77 doesn't support
much, if anything in the way of whole-array operations....and I'd guess
that it might not support any at all. It would be pretty hard to draw
a line between simple cases that could be quickly hacked in, versus
doing the whole thing.
In particular, I'd be suspicious of any form at all of
array = something
I don't see what initialization has to do with it. If g77 doesn't
accept (as I assume it doesn't)
profiler = 0
as an executable assignment statement, then why would one expect it
to accept it as an initialization?
--
Richard Maine | Good judgment comes from experience;
[log in to unmask] | experience comes from bad judgment.
| -- Mark Twain
|