Re: placement of implicit none

From: Richard E Maine (nospam_at_see.signature)
Date: 01/27/05


Date: Thu, 27 Jan 2005 09:36:54 -0800

In article <1106844627.076977.312830@f14g2000cwb.googlegroups.com>,
 beliavsky@aol.com wrote:

> Why does Fortran require the "implicit none" statement to follow any
> "use" statements? Could this constraint be removed?

I couldn't say for sure. I seem to recall reconstructing a reason that
made sense from at least one viewpoint, because I've run into the same
thing... hmm... Oh yes, that was probably it...

Implicit statements in general can depend on other names, including
possibly ones imported via USE. A bit obscure and I don't recall ever
seeing such a thing in actual code, but it can happen in principle. USE
statements can't ever depend on anything else - there's just nothing in
their syntax that could. So it probably simplified life to require that
order instead of detailing the conditions under which the other order
works.

> I want "implicit none" to appear as early as possible in a code.

Me too. In particular, I'd like to consider "implicit none" as almost a
part of the syntax of a module statement. Not literally, but
conceptually, in that it is just automatically how you start a module
before you get to any details about what is in the module. Almost all of
my implicit none statements are at the top of modules, since that "flows
down" to (almost) everything in the module, and almost everything I do
is in modules.

Well, what I'd really have liked is for implicit none to be the default
in free source form, but my comment about that during the f90 public
review didn't get accepted. Some of my others did, but not that one.

I wouldn't think it a very big deal to allow at least the "implicit
none" form before USE statements. For that matter, I don't see that it
would be very hard to allow that ordering more generally; the potential
problem cases aren't hard to describe. (Some existing words might even
almost be enough, though I haven't checked).

Seems to me like a reasonable and trivial thing to ask for in f2003+.

Except that I'm loath to ask for anything at all because my personal
opinion is that J3 is already way overboard with too many features
proposed for f2003+. It seems widely agreed (not universally, but by a
good majority anyway) that f2003+ needs to be a minor revision
comparable to f95, concentrating on "fixup" of f2003, which was a big
enough revision that it is bound to need substantial fixup work just
like f90 did. However, while this seems agreed in principle, some people
obviously have drastically different viewpoints on what constitutes
"minor" and how much work features will take. I think that a lot of the
proposals labeled as minor are far bigger deals than their proponents
are arguing. I view the situation as bad enough that I just have trouble
with throwing in ideas that I like and arguing that "mine are actually
minor, unlike those others."

At times I worry that one or two people, by submitting more proposals
than I consider reasonable, have essentially "clogged the pipeline" and
effectively frozen out other ideas as a result. But then, I can't
reasonably complain about someone working hard and diligently on what
they think will be improvements, can I? This all just my personal
musings and viewpoint, of course.

-- 
Richard Maine                       |  Good judgment comes from experience;
email: my first.last at org.domain  |  experience comes from bad judgment.
org: nasa, domain: gov              |        -- Mark Twain


Relevant Pages

  • Re: Help please with a small code conversion
    ... I have a third reason, which is rather compelling for my purposes. ... As you know, I prefer IMPLICIT NONE, but in automatically ... declarations and the code to separate files then combine them ... The code generator is at ...
    (comp.lang.fortran)
  • Re: fopen() questions
    ... And the only reason we'd ever want ... an implicit seek instead of an explicit seek is that the implicit seek ... combines with the following write atomically, but the explicit seek+write ... So if you open a file in append mode, ...
    (comp.lang.c)
  • Re: IMPLICIT NONE (F2k8+/-)
    ... > IMPLICIT NONE should finally be made default beginning at F2k8. ... > switches can be specified to get the older behavior. ... > no good reason to continue this way. ... The IBM 1130 compiler could do ...
    (comp.lang.fortran)
  • Re: "tight third"?
    ... compelling about the character's voice, but it seems to me that you can ... One reason to use first person is if the story is very much "told"; for instance I have one WIP told by a teenaged drug-using felinoid, and she's not too good at this whole linear story thing, so there's a lot of footnotes where she tries to clarify things, apologizes to the reader, states her opinions, or just complains about things that she finds very silly. ... A story told from a felinoid's viewpoint is very much about that felinoid, and first person subtly emphasizes that. ...
    (rec.arts.sf.composition)
  • Re: Outsourcing Security to an Arab Country
    ... viewpoint, there will be links to back up what that person's viewpoint is. ... what a liar he is and blah blah blah, but I'm not interested in reading it. ... That's not "reason". ... fault, my fault, nobody's fault...no matter what else happens, I'm gonna' ...
    (rec.gambling.poker)