source:
CIVL/mods/dev.civl.abc/examples/fortran/commonblock/common_continuation.f
| Last change on this file was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 438 bytes | |
| Rev | Line | |
|---|---|---|
| [aad342c] | 1 | ! COMMON block with continuation in SUB. The two |
| 2 | ! lines referencing MC are treated as one line | |
| 3 | ! with the combined list of variables. | |
| 4 | PROGRAM MAIN | |
| 5 | INTEGER A | |
| 6 | REAL F,R,X,Y | |
| 7 | COMMON /MC/ R,A,F | |
| 8 | A = 5 | |
| 9 | R = 3.5 | |
| 10 | CALL SUB(X,Y) | |
| 11 | WRITE(*,*) F | |
| 12 | END | |
| 13 | ||
| 14 | SUBROUTINE SUB(P,Q) | |
| 15 | INTEGER I | |
| 16 | REAL A,B,P,Q | |
| 17 | COMMON /MC/ A,I | |
| 18 | COMMON /MC/ B | |
| 19 | B = I + 2*A | |
| 20 | END |
Note:
See TracBrowser
for help on using the repository browser.
