strarray_4.f90
来自「用于进行gcc测试」· F90 代码 · 共 40 行
F90
40 行
program strarray_4 character(len=5), dimension(2) :: c c(1) = "Hello" c(2) = "World" call foo1(c) call foo2(c, 2) call foo3(c, 5, 2)containssubroutine foo1(a) implicit none character(len=5), dimension(2) :: a character(len=5), dimension(2) :: b b = a; if ((b(1) .ne. "Hello") .or. (b(2) .ne. "World")) call abortend subroutinesubroutine foo2(a, m) implicit none integer m character(len=5), dimension(m) :: a character(len=5), dimension(m) :: b b = a if ((b(1) .ne. "Hello") .or. (b(2) .ne. "World")) call abortend subroutinesubroutine foo3(a, n, m) implicit none integer n, m character(len=n), dimension(m) :: a character(len=n), dimension(m) :: b b = a if ((b(1) .ne. "Hello") .or. (b(2) .ne. "World")) call abortend subroutineend program
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?