module test2
implicit none
integer :: ts
end module test2
module test1
implicit none
type :: ty2(t_size )
integer, len :: t_size
real :: x(t_size )
end type
type :: ty1(t_size )
integer, len :: t_size
real :: x(t_size )
end type
abstract interface
subroutine dummy( dat1 )
use test2
import ty1
implicit none
type(ty1(t_size=ts)), intent(inout) :: dat1
end subroutine
end interface
end module
program test
use test2
ts = 10
end program
Может кто-нибудь сказать мне, почему это не работает?
Я могу сказать вам, что вызывает ошибку type(ty1(t_size=ts)), intent(inout) :: dat1
Если я вместо этого объявляю ts как параметр,это работает, но, кажется, не принять другой путь, где это динамично?
Заранее спасибо