char_result_10.f90
来自「用于进行gcc测试」· F90 代码 · 共 37 行
F90
37 行
! { dg-do compile }! PR 18883: Fake result variables of non-constant length, with ENTRYfunction s_to_c(chars) character, pointer :: chars(:) character(len=len(chars)) :: s_to_c, s_to_c_2 s_to_c = 'a' returnentry s_to_c_2(chars) s_to_c_2 = 'b' returnend function s_to_cprogram huj implicit none interface function s_to_c(chars) character, pointer :: chars(:) character(len=len(chars)) :: s_to_c end function s_to_c function s_to_c_2(chars) character, pointer :: chars(:) character(len=len(chars)) :: s_to_c_2 end function s_to_c_2 end interface character, pointer :: c(:) character(3) :: s allocate(c(5)) c = (/"a", "b", "c" /) s = s_to_c(c) s = s_to_c_2(c)end program huj
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?