File: test_forall.f90

package info (click to toggle)
fortran-language-server 3.2.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,268 kB
  • sloc: python: 9,688; f90: 1,195; fortran: 30; makefile: 28; ansic: 20
file content (14 lines) | stat: -rw-r--r-- 286 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
program test_forall
   implicit none
   integer :: i, j, dim=3, a(10) = 2

   select case (dim)
    case(3)
      forall(i=1:10)
         a(i) = a(i) **2
         forall (j=1:i) a(j) = a(j) ** 2
      end forall
    case default
      call abort()
   end select
end program test_forall