Re: IMPLICIT NONE (F2k8+/-)



Edward N Bromhead wrote in message ...
>
>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.

Over the years, that "convention" has been a source of large amounts
of wasted computer time and human time.

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

That doesn't stand up. Why have the program crash at run time
for an error that should have been picked up at compile time ?
Even if the linker picks up the error, all it can do is give the
name of the offending variable. It cannot give the line number
in the source code.
All this merely wastes valuable time.

> The type of user-defined functions is also given
>at the outset of the code for that function.

I thought that you were using implicit typing.
If so, the type won't be specified explicitly.

> We have to conclude that only
>single variables are susceptible to mistyping

Any variable is susceptible to mis-typing,
including the name of procedures.

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

Most compilers haven't done that for years.

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

That reminds me of the programmer who, whenever he made a mistake, said
"Can't understand it. Never made a mistake before in my life.".

> 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: Free FAT16 Filesystem
    ... being an honourable reason. ... Dave, I made every effort 3 weeks ago to have you understand that if you ... >>Murray did not mention Keil in his correspondence to you. ... >>both your compiler AND under Keil's, ...
    (comp.arch.embedded)
  • compiler and metadata, request opinions...
    ... a lot of the upper/middle compiler machinery is still lacking (such as ... embed the metadata directly into the object modules (the reason being that ... request for a particular piece of information is embedded in a symbol (sort ... it will be loaded into an in-memory version of the database. ...
    (comp.compilers)
  • misc: compiler and metadata...
    ... a lot of the upper/middle compiler machinery is still lacking (such as ... embed the metadata directly into the object modules (the reason being that ... request for a particular piece of information is embedded in a symbol (sort ... it will be loaded into an in-memory version of the database. ...
    (comp.lang.misc)
  • Re: "Sorting" assignment
    ... issue on some ancient compiler doesn't make a lot of sense. ... to his on a few commonly used platforms and compilers, ...  Be sure and call the swap ... reason to find algorithms which operate independent of it. ...
    (comp.programming)
  • Re: Program Fails When Parameter Fixed Constants are Changed (F77) ??
    ... So check the type and rank. ... type declaration triggers implicit typing, so the compiler thinks this ... All of this, at least the above stuff, is also true of f77. ...
    (comp.lang.fortran)