Hi everyone!
I'm just trying to remember my fortran programming skills, but it's looking a little bit hard.
I've tried this simple code in the Visual Studio (Intel Visual Fortran 10 compiler), and it gives me a bunch of errors:
INTERFACE
Subroutine load_P(P,N)
real :: P,
integer, INTENT(IN) :: N
End subroutine
END INTERFACE
integer :: N
real, allocatable :: P,
N = 20
call load_P(P,N)
END PROGRAM
SUBROUTINE load_P(P,N)
real, allocatable :: P,
integer N
END SUBROUTINE
->>>
Error: There is a conflict between local interface block and external interface block. [LOAD_P]
Error: The number of actual arguments cannot be greater than the number of dummy arguments. [LOAD_P]
Error: The type of the actual argument differs from the type of the dummy argument. [P]
Error: The shape matching rules of actual arguments and dummy arguments have been violated. [P]
Thanks for your help!!
I'm just trying to remember my fortran programming skills, but it's looking a little bit hard.
I've tried this simple code in the Visual Studio (Intel Visual Fortran 10 compiler), and it gives me a bunch of errors:
INTERFACE
Subroutine load_P(P,N)
real :: P,
integer, INTENT(IN) :: N
End subroutine
END INTERFACE
integer :: N
real, allocatable :: P,
N = 20
call load_P(P,N)
END PROGRAM
SUBROUTINE load_P(P,N)
real, allocatable :: P,
integer N
END SUBROUTINE
->>>
Error: There is a conflict between local interface block and external interface block. [LOAD_P]
Error: The number of actual arguments cannot be greater than the number of dummy arguments. [LOAD_P]
Error: The type of the actual argument differs from the type of the dummy argument. [P]
Error: The shape matching rules of actual arguments and dummy arguments have been violated. [P]
Thanks for your help!!