ex1106.f90
来自「Fortran95的一些有用的源程序」· F90 代码 · 共 27 行
F90
27 行
module MA
implicit none
type ta
integer a
end type
interface operator(+)
module procedure add
end interface
contains
integer function add(a,b)
type(ta), intent(in) :: a,b
add=a%a+b%a
end function
end module
program main
use MA
implicit none
type(ta) :: a,b
integer :: c
a%a=1
b%a=2
c=a+b
write(*,*) c
end program
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?