File: test_block.f08

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 (32 lines) | stat: -rw-r--r-- 502 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
SUBROUTINE block_sub()
INTEGER :: res0,i,j,end_var
res0 = 0
add1 : BLOCK
  INTEGER :: res1
  res1 = res0 + 1
  BLOCK
    INTEGER :: res2,blockVar
    res2 = res1 + 1
    blockVar = res0 + 1
  END BLOCK
END BLOCK add1
!
outer: DO i=1,10
  DO j=1,i
    res0=res0+1
  END DO
END DO outer
!
IF(res0>10)THEN
  i=res0
END IF
!
ASSOCIATE( x=>1 )
  i=i+x
END ASSOCIATE
! Test variables/labels starting with "end"
end_var= 1
end_label: DO i=1,3
  end_var = end_var + i
END DO end_label
END SUBROUTINE block_sub