Re: IMPLICIT NONE (F2k8+/-)




"Gary L. Scott" <garyscott@xxxxxxx> wrote in message
news:11ln80341kkhtbd@xxxxxxxxxxxxxxxxxxxxx
> IMPLICIT NONE should finally be made default beginning at F2k8. Compiler
> switches can be specified to get the older behavior. There is absolutely
> no good reason to continue this way.
> --
>
> Gary Scott

The assertion that there is absolutely no good reason to continue with a
convention that has served Fortran for 50 years (nearly), is itself, no good
reason for change. Plenty of code has been written, and plenty of good work
done, using implicit typing. Those of us who like implicit typing find that
we can instantly recognize the type of a variable from its initial letter,
provided that explicit typing has not been turned on.
The argument that this leads to errors because of mistyped variable
names is in practice not so good as it looks. All arrays have to be
dimensioned somewhere, so that a mistyped (in the sense of key punching)
array name shows up during compilation or linking, often/usually as a call
to a non-existent function. The type of user-defined functions is also given
at the outset of the code for that function. We have to conclude that only
single variables are susceptible to mistyping and not being trapped. Just
how many single variables are there in an individual subprogram? So many
that a simple listing of all the variables used in a given subprogram won't
show, instantly, that such an error exists? The IBM 1130 compiler could do
that, and computer science has marched on since 1970! I rarely use more than
a few single variables in a subprogram, and get to know their names
intimately.
IMPLICIT NONE is the case that could be selected by a compiler switch,
as the user of this option will have declared the type of every variable
explicitly, and other than the case where the programmer has made an error,
it is immaterial whether or not it is used. In other words, IMPLICIT NONE is
a redundant statement in code that is correct!
The present arrangement permits all preferences to be served. That
seems to me to be an ideal compromise, and an excellent reason not to
change.

Eddie Bromhead


.



Relevant Pages

  • Re: Ada exception block does NOT work?
    ... The parameter/formal declarations are like ... the compiler would guess for you how to call puts. ... > * implicit declaration of external functions. ... > K&R probably where good assember programmers but they where lousy compiler ...
    (comp.lang.ada)
  • Re: F77 vs F90+
    ... And LOLD is not a logical variable variable by default, ... As noted above, IMPLICIT NONE does not ... no, my F77 is, as pointed out by Richard, ... not a complete F77 'spec compiler, but not extended beyond F77 scope ...
    (comp.lang.fortran)
  • Re: Nothing
    ... |>happening with implicit management of objects. ... | was interested in another aspect of VB's internals* at the time. ... | compiler takes care of it whether you wanted it to or not. ...
    (microsoft.public.scripting.vbscript)
  • Re: trim(string) problems
    ... >> Together these make me think it is a compiler problem ... >> but correctly finds size with both explicit and implicit ... that makes my test program with the module work and should ...
    (comp.lang.fortran)
  • Re: first time using direct access files: recl ??
    ... I suppose the compiler *MIGHT* be omitting non-written trailing ... he was particularly metioning source form issues. ... implicit typing (evil), the compiler will just make one up anyway. ...
    (comp.lang.fortran)