forall.f90
来自「linux下编程用 编译软件」· F90 代码 · 共 18 行
F90
18 行
! Program to test the FORALL constructprogram testforall implicit none integer, dimension (3, 3) :: a integer, dimension (3) :: b integer i a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/)); forall (i=1:3) b(i) = sum (a(:, i)) end forall if (b(1) .ne. 6) call abort if (b(2) .ne. 15) call abort if (b(3) .ne. 24) call abortend program
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?