I have CERN program which calculates the gamma function of complex argument, but I can't run the program because of lack of Fortran knowledge.
I have the following program:
PROGRAM Console1
IMPLICIT REAL *8 (A-H,O-Z)
COMPLEX *16 gama,z,w
z=cmplx(0,0.707106781186548d0)
gama=cgamma(0,z,w)
END
SUBROUTINE cgamma(mo, z, w)
INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(14, 60)
INTEGER, INTENT(IN) :: mo
COMPLEX (dp), INTENT(IN) :: z
COMPLEX (dp), INTENT(OUT) :: w
... the subroutine code here
END SUBROUTINE cgamma
and then error appears
error #6553: A function reference is invoking a subroutine subprogram. [CGAMMA]
IMPLICIT
other theIMPLICIT NONE
. Look at the subroutine code how variables should be defined. You are asking for A LOT of trouble by usingIMPLICIT REAL
.