- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have been trying to call GAMMA function in IMSL from inside a subroutine.
It works when it is there in the main program , but when I call use it
inside a subroutine , it says GAMMA is not declared..!!
This is how my program looks like
INCLUDE 'link_f90_dll.h'
USE GAMMA_INT
USE UMACH_INT
USE linear_operators
IMPLICIT NONE
INTEGER Nmax
PARAMETER (Nmax=401)
REAL G(Nmax),F
F=1.5
CALL GAM(Nmax,G,F)
END
SUBROUTINE GAM(Nmax,G,F)
IMPLICIT NONE
INTEGER Nmax, I
REAL *8 G(Nmax)
REAL *8 F, V1, V2, V3
DO I=1,Nmax
V1= GAMMA(I-F)
V2= GAMMA(-F)
V3= GAMMA(I+1)
G(I)=V1/(V2*V3)
END DO
RETURN
END
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You would require a copy of the necessary USE statements in the subroutine where the function call occcurs. USE scope does not extend beyond an END.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page