home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!stanford.edu!unixhub!slacvx.slac.stanford.edu!fairfield
- From: fairfield@slacvx.slac.stanford.edu
- Subject: Re^2: Help With Named common blocks...again
- Message-ID: <1992Dec15.204935.1@slacvx.slac.stanford.edu>
- Lines: 33
- Sender: news@unixhub.SLAC.Stanford.EDU
- Organization: Stanford Linear Accelerator Center
- References: <jumper.724475994@garfield.catt.ncsu.edu>
- Distribution: comp
- Date: Wed, 16 Dec 1992 04:49:35 GMT
-
- Thanks, Michael, for prviding the additional information:
-
- In article <jumper.724475994@garfield.catt.ncsu.edu>, jumper@garfield.catt.ncsu.edu (Michael Lanham) writes:
- [...]
- > Now I find in a file separate from the data file (the first one to declare what
- > SHARE1 is like) a use of SHARE1 entirely different. This is in the first
- > SUBROUTINE in this src file that uses SHARE1 and every other routine that uses
- > SHARE1 in this file also follows the convention below.
-
- [...]
-
- > My original question still stands. Since these declarations are not the same
- > length nor (obviously) the same size arrays, is the second set of definitions
- > concatenated to the first? Or, because they are in separate files, and
- > because in the second file(the odd man out file) the first declaration of
- > SHARE1 is _not_ like the datafile definition, they are pointing to the same
- > address space(ie TABLE(1) = NSVT(1) and OSVT(1) = TABLE(1001)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- This latter is the case (evidently I was correct in my original
- followup...just lucky I guess :-). Since the named common appears only
- once in each program section, the second varient you encountered refers
- to the same storage locations as the first varient, but with different
- names and, possibly, data types. That is, it is as if the second version
- were a alternative MAP within a UNION. To the extent you can, verify that
- this is the intended behaviour.
-
- -Ken
- --
- Dr. Kenneth H. Fairfield | Internet: Fairfield@Slac.Stanford.Edu
- SLAC, P.O.Box 4349, MS 98 | DECnet: 45537::FAIRFIELD (45537=SLACVX)
- Stanford, CA 94309 | BITNET Fairfield@Slacvx
- ----------------------------------------------------------------------------
- These opinions are mine, not SLAC's, Stanford's, nor the DOE's...
-