home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!wupost!waikato.ac.nz!comp.vuw.ac.nz!grace.cri.nz!steve
- Newsgroups: comp.lang.fortran
- Subject: Re: Need help with named common blocks
- Message-ID: <STEVE.92Dec15210437@tara.grace.cri.nz>
- From: steve@grace.cri.nz (Stephen White)
- Date: 15 Dec 92 21:04:37
- Sender: news@grace.cri.nz
- References: <jumper.724304615@fritz.catt.ncsu.edu><1992Dec13.211623.1@slacvx.slac.stanford.edu>
- Distribution: comp
- Organization: Dept. of Scientific and Industrial Research, NZ.
- In-Reply-To: fairfield@slacvx.slac.stanford.edu's message of Mon, 14 Dec 1992 05:16:23 GMT
- Lines: 26
-
- Things seem to be getting a little confused on this topic. It was not clear in
- the original posting if the situation was
-
- SUBROUTINE A
- COMMON /SHAR1/ This, That, Somthing, Else(100)
- COMMON /SHAR1/ And, A, Little, More
-
- This is quite legal and equivalent to
-
- COMMON /SHAR1/ This, That, Somthing, Else(100),
- $ And, A, Little, More
-
- While
-
- SUBROUTINE A
- COMMON /SHAR1/ This, That, Somthing, Else(100)
-
- SUBROUTINE B
- COMMON /SHAR1/ And, A, Little, More
-
- is also common (although perhaps not wise) and provides a mechanism
- for shareing storage between two routines (perhaps as a large work area).
- Many compilers will warn you that you have common blocks of different lengths
- if they are in the same file.
-
- Steve White
-