For an academic paper, the authors have provided their code of their results and so I am trying to run their code. When I compile, there is an error which says that a function cannot be used as an argument. Here below I provide the relevant parts of the code that the error seem to point out (In particular the message is: "error 997 - An internal FUNCTION, such as FOC, cannot be used as an actual argument").
.........
function foc(ain) implicit none real*8:: ain, foc foc = plterm+meru(ain,i)-upap(n,ain,i) end function foc ...........
yy1 = zbrent(foc,a(np-1),yexp,errrel) where zbrent is a subroutine called by the main program. If necessary I can attach the whole code.
FUNCTION zbrent (func,x1,x2,tol) implicit none real(8), external:: func real(8), intent(in):: x1,x2,tol END FUNCTION zbrent I am not familiar with Fortran or any programming and wondering whether someone can advice something.
zbrentdefined?