source:
CIVL/mods/dev.civl.abc/examples/fortran/commonblock/common.f
| Last change on this file was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 467 bytes | |
| Line | |
|---|---|
| 1 | PROGRAM MAIN |
| 2 | ! FLASH4.4/source/flashUtilities/interpolation/oneDim |
| 3 | ! Simple example of a common block. Note that the |
| 4 | ! contents are accessed through different names |
| 5 | ! in MAIN and SUB. |
| 6 | |
| 7 | INTEGER A |
| 8 | REAL F,R,X,Y |
| 9 | COMMON /MC/ R,A,F |
| 10 | A = 5 |
| 11 | R = 3.5 |
| 12 | CALL SUB(X,Y) |
| 13 | WRITE(*,*) F |
| 14 | END |
| 15 | |
| 16 | SUBROUTINE SUB(P,Q) |
| 17 | INTEGER I |
| 18 | REAL A,B,P,Q |
| 19 | COMMON /MC/ A,I,B |
| 20 | B = I + 2*A |
| 21 | END |
Note:
See TracBrowser
for help on using the repository browser.
