- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Hello,
In one of my subroutines, I need to use a function called Bisect (i.e., bisection method for root findings). I got this error. Would you please take a look at the link below and let me know how I can fix this error? Thanks so much,
Mehdi
Error 1 error #6410: This name has not been declared as an array or a function. [BISECT]
Link kopiert
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
You have lots of problems here - you added IMPLICIT NONE but many variables are not declared.
For this specific issue, BISECT is declared in module Parm as "Real". Then in function Bisect in Bisect_sub,f90, you have "Use parm", which pulls in the declaration of BISECT. This duplicate definition is not allowed in the language (which is why you also get):
error #6405: The same named entity from different modules and/or program units cannot be referenced. [BISECT]
It seems to me that someone (you?) is trying to update some old F77-style code to more modern Fortran, moving declarations into modules. If you do this you have to make sure that variables and routines are not multiply declared. For routines, it is often best to put them in modules rather than keep them as external routines that use a common module.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
The identifier Bisect is used with two different meanings: (i) as a variable that contains a REAL value, and (ii) the name of a function subprogram that takes a number of arguments and returns a REAL value. If you mix these up, bad things happen.
In the old days, we would submit submit a card deck for an overnight run on a mainframe, expecting to receive output the next morning in the form of line printer fanfolds. Once in a while, we would receive instead a torn piece of a card with "Program Executed Data" scribbled on the back, causing us embarrassment that lasted for several hours, at least.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Thanks so much.
Let me work on it and will be back to you.
Mehdi
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite