module_interface_2.f90

来自「linux下编程用 编译软件」· F90 代码 · 共 30 行

F90
30
字号
! Test generic interfaces declared in modules.! We used to get the name mangling wrong for these.module module_interface_2  interface foo    subroutine myfoo (i)      integer i    end subroutine    module procedure bar  end interfacecontainssubroutine bar (r)  real r  if (r .ne. 1.0) call abort ()end subroutineend modulesubroutine myfoo (i)  integer i  if (i .ne. 42) call abort ()end subroutineprogram test  use module_interface_2  call foo (42)  call foo (1.0)end program

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?