protected_3.f90
来自「用于进行gcc测试」· F90 代码 · 共 24 行
F90
24 行
! { dg-options "-std=f95 -fall-intrinsics" }! PR fortran/23994!! Test PROTECTED attribute. Within the module everything is allowed.! Outside (use-associated): For pointers, their association status! may not be changed. For nonpointers, their value may not be changed.!! Reject in Fortran 95module protmod implicit none integer :: a integer, target :: at integer, pointer :: ap protected :: a, at, ap ! { dg-error "Fortran 2003: PROTECTED statement" }end module protmodmodule protmod2 implicit none integer, protected :: a ! { dg-error "Fortran 2003: PROTECTED attribute" } integer, protected, target :: at ! { dg-error "Fortran 2003: PROTECTED attribute" } integer, protected, pointer :: ap ! { dg-error "Fortran 2003: PROTECTED attribute" }end module protmod2
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?