assignment_1.f90

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

F90
37
字号
! { dg-do run }! { dg-options -Wsurprising }integer, pointer :: pinteger, target :: t, s! The tests for character pointers are currently commented out,! because they don't yet work correctly.! This is PR 17192!!$character*5, pointer :: d!!$character*5, target :: c, et = 1p => s! We didn't dereference the pointer in the following line.p = f() ! { dg-warning "POINTER valued function" "" }p = p+1if (p.ne.2) call abort()if (p.ne.s) call abort()!!$! verify that we also dereference correctly the result of a function !!$! which returns its result by reference!!$c = "Hallo"!!$d => e!!$d = g() !  dg-warning "POINTER valued function" "" !!$if (d.ne."Hallo") call abort()containsfunction f()integer, pointer :: ff => tend function f!!$function g()!!$character, pointer :: g!!$g => c!!$end function gend

⌨️ 快捷键说明

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