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,
Error 1 error #6410: This name has not been declared as an array or a function. [BISECT]
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.
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.