くだすれFORTRAN(超初心者用)その4
■ このスレッドは過去ログ倉庫に格納されています
0646デフォルトの名無しさん
2009/10/13(火) 19:46:13こんな感じ?
module mod1
interface sub
module procedure sub_int, sub_real
end interface
contains
subroutine sub_int(n)
integer, intent(in) :: n
print *, "INTEGER", n
end subroutine sub_int
subroutine sub_real(x)
real, intent(in) :: x
print *, "REAL", x
end subroutine sub_real
end module mod1
! ---------------
program prog1
use mod1
call sub(1)
call sub(2.0)
end program prog1
■ このスレッドは過去ログ倉庫に格納されています