source: CIVL/mods/dev.civl.abc/examples/fortran/commonblock/bug_common_short.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: 515 bytes
Line 
1! This is like common_short.f, but the common block
2! has a name here. In this case, it is illegal to use
3! only parts of the common block (i.e. leave some
4! variables undeclared in SUB, in this case, PAD3)
5 PROGRAM MAIN
6 REAL X
7 X = 1.0
8 CALL SUB(X,1)
9 CALL SUB(X,2)
10 WRITE(*,*) X
11 END
12
13 SUBROUTINE SUB(X,FLAG)
14 INTEGER FLAG
15 REAL X
16 COMMON /MC/ Y
17 IF(FLAG .eq. 1) THEN
18 Y = X * 2
19 ELSE
20 X = Y
21 ENDIF
22 END
Note: See TracBrowser for help on using the repository browser.