Recent content by pilipili2021
-
P
Comp Sci Can‘t call a subroutine name in a subroutine in Fortran90
finally I find the problem. If I code like Call CaoB() contains subroutine B() the error comes. If I move subroutine B out of 'contains' like subroutine B() subroutine something call CaoB() end subroutine something Then the problem is solved.- pilipili2021
- Post #8
- Forum: Engineering and Comp Sci Homework Help
-
P
Comp Sci Can‘t call a subroutine name in a subroutine in Fortran90
My ifort is on ubuntu 20.04 , also on Linux. Everything worked well before my hard disk suddenly broken. May problems created with newer versions:cry:- pilipili2021
- Post #7
- Forum: Engineering and Comp Sci Homework Help
-
P
Comp Sci Can‘t call a subroutine name in a subroutine in Fortran90
Thank you for your reply! It's a great help. May be my environment have some problems. my ifort version is 2021.4.0 So confused.- pilipili2021
- Post #5
- Forum: Engineering and Comp Sci Homework Help
-
P
Comp Sci Can‘t call a subroutine name in a subroutine in Fortran90
Thank you for your reply. Do you mean add some code like 'external B' or 'external fcn'? That not works. In the subroutine 'CaoB' it have a subroutine name 'fcn' determined by the interface. When I call 'CaoB(B)', 'B' as a subroutine name should be instead of 'fcn' in the subroutine 'CaoB'...- pilipili2021
- Post #3
- Forum: Engineering and Comp Sci Homework Help
-
P
Comp Sci Can‘t call a subroutine name in a subroutine in Fortran90
Here is the code for example: PROGRAM main CALL B() CALL CaoB(B) contains subroutine B() IMPLICIT NONE write (*,*) 'fk' end subroutine B subroutine CaoB(fcn) implicit none INTERFACE SUBROUTINE fcn() IMPLICIT NONE END SUBROUTINE fcn END INTERFACE write...- pilipili2021
- Thread
- Fortran Fortran90 Subroutine
- Replies: 7
- Forum: Engineering and Comp Sci Homework Help