Re: Problem when creating a.out and -convert big_endian compiler option



Hello,

Förster vom Silberwald wrote:

I must confess: I have never understood what this "implicit none" in
Fortran programs really means. I see it sometime when colleagues pass
over some Fortan programs to me.

Older (and it's still around) Fortran has the concept
of "implicit typing" where the first letter of a name
specifies the type. (Some programmers like to be able
to code without declarations, for example, like MATLAB code.)

Modern practice frowns on this practice. Starting with Fortran 90,
(well, actually starting with Mil Std 1753, but let's not split hairs),
Fortran has had a statement "implicit none" to disable the implicit
typing rules, and therefore force declaration of all variable names.

Thus, when reading older codes, sometimes the reader must check
the implicit statement to see the types of variable names.
If there's no implicit statement, default rules are in effect.
The default rules were: First letter in (A through H or O through Z),
the type is default real; First letter in (I through N), the type is
default integer.

If you have the time and you expect to be working on the code
for a while, it may be worthwhile to go through it and code
a declaration for each variable.

For one thing, you may well be lead to the bug you're facing now.

--

Dan Nagle
Purple Sage Computing Solutions, Inc.
.



Relevant Pages

  • Re: IMPLICIT NONE (F2k8+/-)
    ... Nobody will be inordinately placed in hardship. ... > big enough of a deal to add a switch as to even argue against it. ... To make it the default disadvantages those of us who like implicit typing - ...
    (comp.lang.fortran)
  • Re: IMPLICIT NONE (F2k8+/-)
    ... And the victims range from the most novice to the most expert (who despite using IMPLICIT NONE in his own code often has to debug other, lesser, code.) ... It has to do with pragmatism, after 33 years of Fortran experience. ... by shrinking the market by nannying other programmers with whom you simply disagree. ... The compilers will always do so no matter what the standard says. ...
    (comp.lang.fortran)
  • Re: Fortran templates
    ... end type MYDATA ... Implicit statements have to come quite early ... Then this module is USEd in the module that defines the template ... in an analogous fashion in Fortran, ...
    (comp.lang.fortran)
  • Re: Ten Commandments for Fortran Programming?
    ... one can use implicit typing for the ... One thing I've often thought would be a nice addition to Fortran is an IOTA intrinsic, ... apply if one is writing a code library that is also expected to be ... But you can't use allocatable sizing and default initialization. ...
    (comp.lang.fortran)
  • Re : Numerical accuracy of C++ and Fortran programs on 32 bit machines
    ... > If you're picking up some existing Fortran code to maintain/use/extend ... > to the case of implicit coercion of constants. ... > intermediate where a single precision variable were assigned to a double ... as this conversion in exact. ...
    (comp.programming)