くだすれFORTRAN(超初心者用)その3
■ このスレッドは過去ログ倉庫に格納されています
0030デフォルトの名無しさん
2007/12/12(水) 21:44:00implicit none
integer:: n
real(8):: x = 2.5d0, y = 3.3d0
n = intfunc(x, y)
print *, n
stop
end
integer function intfunc(x, y)
implicit none
real(8), intent(in):: x
real(8), intent(in):: y
intfunc = int(x) + int(y)
end function
サンプルなので、特に意味ある処理をしてあるわけじゃないですが、、。
■ このスレッドは過去ログ倉庫に格納されています