operator_2.f90
来自「用于进行gcc测试」· F90 代码 · 共 42 行
F90
42 行
! { dg-do compile }! Test that we can't override intrinsic operators in invalid waysmodule foo interface operator(*) module procedure f1 ! { dg-error "conflicts with intrinsic interface" } end interface interface operator(>) module procedure f2 ! { dg-error "conflicts with intrinsic interface" } end interface interface operator(/) module procedure f3 end interfacecontains function f1(a,b) result (c) integer, intent(in) :: a integer, dimension(:), intent(in) :: b integer, dimension(size(b,1)) :: c c = 0 end function f1 function f2(a,b) character(len=*), intent(in) :: a character(len=*), intent(in) :: b logical :: f2 f2 = .false. end function f2 function f3(a,b) result (c) integer, dimension(:,:), intent(in) :: a integer, dimension(:), intent(in) :: b integer, dimension(size(b,1)) :: c c = 0 end function f3end! { dg-final { cleanup-modules "foo" } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?