Re: Fortran Error Problem



highegg wrote:

a DIMENSION declaration is missing for X. The compiler assumes that X
is an external function and complains at link stage that it is missing.

I have seen this happen in a subroutine, where an array is used but
never assigned a value, in which case Fortran considers it a function
as an actual argument.

In this case, it is referenced but never assigned in the main program.
If there was an assignment, it would have been a compilation error.
Here there is no compilation error, but X is never initialized.

-- glen

.



Relevant Pages

  • Re: How did alj/blj/clj get their values?
    ... not Fortran77, in fact it is Fortran 66 - fairly standard for quantum ... Let's start with all those 6h things in the data statement. ... Note hollerith constants got deleted in Fortran77 (though an echo ... and I can't find any text that explains explicitly how that assignment ...
    (comp.lang.fortran)
  • Re: Is Semicolon ";" Allowed in This Fortran Statement ??
    ... < 3) However, upon a recent and more rigorous testing, I realized that ... I pretty much never use semicolon separate statements in Fortran, ... and not so often multiple statements on a line in other languages. ... As I understand it, the assignment should be conditional, the ...
    (comp.lang.fortran)
  • Re: compilation error
    ... Compilation Error ... tarnarytest.c:5: invalid lvalue in assignment. ... What you really need is parentheses. ...
    (comp.lang.c)
  • Re: Operator overloading () with Fortran 95 ?
    ... it's not possible to write a derived type in Fortran ... unfortunate since Fortran's array syntax is very powerful indeed). ... which defined assignment and have syntax like ... (Possibly an extension as a part of future generic programming stuff ...
    (comp.lang.fortran)
  • Re: I think the standard will be on my side (BOZ)
    ... Now, mind you, Fortran on a 32-bit processor could support ... you and I are in agreement about the apparent brokeness of BOZ ... until the actual assignment. ...
    (comp.lang.fortran)