source: CIVL/mods/dev.civl.abc/examples/fortran/commonblock/bug_common_char.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: 655 bytes
Line 
1! This program contains a character array in a common
2! block, along with other variable types. This is
3! against the F77 standard Sec. 8.3.1:
4! > If a character variable or character array is in a
5! > common block, all of the entities in that common block
6! > must be of type character.
7 PROGRAM MAIN
8 INTEGER A
9 REAL F,R,X,Y
10 character C*17
11 COMMON /MC/ R,A,C,F
12 A = 5
13 R = 3.5
14 CALL SUB(X,Y)
15 WRITE(*,*) F
16 END
17
18 SUBROUTINE SUB(P,Q)
19 INTEGER I
20 REAL A,B,P,Q
21 character c*17
22 COMMON /MC/ A,I
23 COMMON /MC/ C,B
24 B = I + 2*A
25 END
Note: See TracBrowser for help on using the repository browser.