File: common_03.f90

package info (click to toggle)
lfortran 0.60.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 58,412 kB
  • sloc: cpp: 173,406; f90: 80,491; python: 17,586; ansic: 9,610; yacc: 2,356; sh: 1,401; fortran: 895; makefile: 37; javascript: 15
file content (18 lines) | stat: -rw-r--r-- 440 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
subroutine pass()
    real A(2), B
    integer i(5), e
    common /SaMpLe/ A, B, i 
    if (abs(A(1) - 10.0) > 1e-7) error stop
    if (abs(B - 20.0) > 1e-7) error stop
    print *, A, B, e
end subroutine

program common3
    real A, B, z1, z2
    integer c, d, e, f, g, h, i(5), j
    common z1, /c/ c, /b/ d /Sample/ A(2), /b/ e, f, //z2 /c/ g, h, j /sample/ B, i
    A = [10.0, 11.0]
    B = 20.0
    e = 123
    call pass()
end program