source:
CIVL/mods/dev.civl.abc/examples/fortran/f77_standard/common_bad.f
| Last change on this file was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 346 bytes | |
| Line | |
|---|---|
| 1 | c Common blocks that go out of scope become undefined. |
| 2 | program p |
| 3 | call sub |
| 4 | call sub2 |
| 5 | end program |
| 6 | |
| 7 | subroutine sub |
| 8 | integer z |
| 9 | common /ins/ z |
| 10 | z = 3 |
| 11 | end subroutine |
| 12 | |
| 13 | subroutine sub2 |
| 14 | integer z |
| 15 | common /ins/ z |
| 16 | c The value of z is undefined |
| 17 | print *, z |
| 18 | end subroutine |
Note:
See TracBrowser
for help on using the repository browser.
