source: CIVL/mods/dev.civl.abc/examples/fortran/f77_standard/common_shapes.f

main
Last change on this file was aad342c, checked in by Stephen Siegel <siegel@…>, 3 years ago

Performing huge refactor to incorporate ABC, GMC, and SARL into CIVL repo and use Java modules.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5664 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 569 bytes
Line 
1c F77 standard Sec. 8.3 COMMON statement
2c Just like in the equivalence statement, the shape does not need to match.
3c Also, the un-named common block does not need the same size everywhere.
4 program p
5 integer a, b(6), c, d(6)
6 common b,a
7 common /cm/ c,d
8 a = 1
9 b = (/1,2,3,4,5,6/)
10 c = a
11 d = b
12 call sub
13 end program
14
15 subroutine sub
16 integer b(2,3), c, d(2,3)
17 common b
18 common /cm/ c,d
19c$ civl assert(b(2,2) .eq. 4)
20c$ civl assert(d(2,2) .eq. 4)
21c$ civl assert(c .eq. 1)
22 end subroutine
Note: See TracBrowser for help on using the repository browser.