source:
CIVL/mods/dev.civl.abc/examples/fortran/commonblock/common_array.f
| Last change on this file was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 369 bytes | |
| Line | |
|---|---|
| 1 | ! Common block using an array that is used in |
| 2 | ! a different shape inside SUB |
| 3 | PROGRAM MAIN |
| 4 | INTEGER A |
| 5 | REAL F,R,X,Y |
| 6 | COMMON /MC/ R(2,3),A,F |
| 7 | A = 5 |
| 8 | R = 3.5 |
| 9 | CALL SUB(X,Y) |
| 10 | WRITE(*,*) F |
| 11 | END |
| 12 | |
| 13 | SUBROUTINE SUB(P,Q) |
| 14 | INTEGER I |
| 15 | REAL A(6),B,P,Q |
| 16 | COMMON /MC/ A,I,B |
| 17 | B = I + 2*A(6) |
| 18 | END |
Note:
See TracBrowser
for help on using the repository browser.
