home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / fortran / 4746 < prev    next >
Encoding:
Text File  |  1992-12-16  |  2.7 KB  |  60 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!newsgate.watson.ibm.com!yktnews!admin!yktnews!prener
  3. From: prener@watson.ibm.com (Dan Prener)
  4. Subject: Re: Help With Named common blocks...again
  5. Sender: news@watson.ibm.com (NNTP News Poster)
  6. Message-ID: <PRENER.92Dec15234358@prener.watson.ibm.com>
  7. In-Reply-To: jumper@garfield.catt.ncsu.edu's message of Wed, 16 Dec 1992 03:19:54 GMT
  8. Date: Wed, 16 Dec 1992 04:43:58 GMT
  9. Distribution: comp
  10. Disclaimer: This posting represents the poster's views, not necessarily those of IBM
  11. References: <jumper.724475994@garfield.catt.ncsu.edu>
  12. Nntp-Posting-Host: prener.watson.ibm.com
  13. Organization: IBM T.J. Watson Research Center, Hawthorne, New York
  14. Lines: 44
  15.  
  16. In article <jumper.724475994@garfield.catt.ncsu.edu> jumper@garfield.catt.ncsu.edu (Michael Lanham) writes:
  17.  
  18. > It has been pointed out to me that the original post I created for this group
  19. > was ambiguous.  
  20.  
  21. > Let me start over.  I have a program that has several source files.  The data
  22. > module consists entirely of a BLOCK DATA segment.
  23.  
  24. > In that data module there is a COMMON block that looks like the following.
  25.  
  26. >       BLOCK DATA
  27. >       IMPLICIT INTEGER(A-Z)
  28. >       COMMON/SHARE1/TABLE(1770),NOPU(54),FLHS(54),UNUSE0(122),
  29. >      -           XLATE(127),KWT1(50),KWT2(50),STACK1(50),STACK2(50),
  30. >      -           SYMBOL(8),VALUE(8),UNUSE5(16),CHAR(80),VALUXY(12),
  31. >      -           LISTX(61),INTERX(70),SYNTAB(2,26),CHARX(26),TAG(50),
  32. >      -           NEWSPT(58),ROWSYM(131),COLSYM(50)
  33.  
  34.  
  35. > In most of the other files the subroutines that access this common block are
  36. > declared the same way.  
  37.  
  38. > Now I find in a file separate from the data file (the first one to declare what
  39. > SHARE1 is like) a use of SHARE1 entirely different.  This is in the first
  40. > SUBROUTINE in this src file that uses SHARE1 and every other routine that uses
  41. > SHARE1 in this file also follows the convention below. 
  42.  
  43. >       IMPLICIT INTEGER(A-Z)
  44. >       COMMON/SHARE1/NSVT(1000),OSVT(1000),
  45. >      -             OPND(3),LINE(133),UNUSE3(574),
  46. >      -             OUTTAB(50,4),SUPP(100,2),SYMBL(2),UNUSE2(18)
  47.  
  48.  
  49. > My original question still stands.  Since these declarations are not the same
  50. > length nor (obviously) the same size arrays, is the second set of definitions
  51. > concatenated to the first?  Or, because they are in separate files, and
  52. > because in the second file(the odd man out file) the first declaration of
  53. > SHARE1 is _not_ like the datafile definition, they are pointing to the same
  54. > address space(ie TABLE(1) = NSVT(1) and OSVT(1) = TABLE(1001)
  55.  
  56. It is the latter.  Because they are in separate files, they are pointing
  57. to the same memory.
  58. --
  59.                                    Dan Prener (prener@watson.ibm.com)
  60.