FORTRAN �W
■ このスレッドは過去ログ倉庫に格納されています
0624デフォルトの名無しさん
2009/10/17(土) 23:13:19とりあえず、IVF 11.1 では通った
誰か Fortran 95/2003 Explained の日本語訳作って
module mod1
implicit none
type Circle
real :: d
contains
procedure :: area => func1
end type Circle
contains
real function func1(this)
class(Circle) :: this
func1 = (this%d ** 2) * 3.14 / 4.0
end function func1
end module mod1
program main
use mod1
implicit none
type(Circle) :: c
c%d = 10.0
print *, c%area()
end program main
■ このスレッドは過去ログ倉庫に格納されています