source: CIVL/mods/dev.civl.abc/examples/fortran/f77_standard/equivalence.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: 485 bytes
Line 
1c F77 standard Sec. 8.2: An EQUIVALENCE statement is used to specify the
2c sharing of storage units by two or more entities in a program unit.
3 program p
4 implicit none
5 integer i(4), j(3)
6 real a(2,2),b(4),y(2)
7 complex z(1)
8 equivalence (i(1), j), (a(1,1),b(1)), (y(1),z(1))
9 i = 0
10 j = 1
11c$ civl assert(all(i .eq. (/1,1,1,0/)))
12 b(3) = 2
13c$ civl assert(a(1,2) .eq. 2)
14 y = (/4,5/)
15c$ civl assert(imag(z) .eq. 5)
16 end program
Note: See TracBrowser for help on using the repository browser.