⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 strarray_4.f90

📁 linux下编程用 编译软件
💻 F90
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -