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

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!pmafire!news.dell.com!natinst.com!cs.utexas.edu!usc!rpi!think.com!ames!agate!stanford.edu!rock!taco!garfield.catt.ncsu.edu!jumper
  3. From: jumper@garfield.catt.ncsu.edu (Michael Lanham)
  4. Subject: Help With Named common blocks...again
  5. Message-ID: <jumper.724475994@garfield.catt.ncsu.edu>
  6. Sender: news@ncsu.edu (USENET News System)
  7. Organization: North Carolina State University
  8. Distribution: comp
  9. Date: Wed, 16 Dec 1992 03:19:54 GMT
  10. Lines: 46
  11.  
  12. It has been pointed out to me that the original post I created for this group
  13. was ambiguous.  
  14.  
  15. Let me start over.  I have a program that has several source files.  The data
  16. module consists entirely of a BLOCK DATA segment.
  17.  
  18. In that data module there is a COMMON block that looks like the following.
  19.  
  20.       BLOCK DATA
  21.       IMPLICIT INTEGER(A-Z)
  22.       COMMON/SHARE1/TABLE(1770),NOPU(54),FLHS(54),UNUSE0(122),
  23.      -           XLATE(127),KWT1(50),KWT2(50),STACK1(50),STACK2(50),
  24.      -           SYMBOL(8),VALUE(8),UNUSE5(16),CHAR(80),VALUXY(12),
  25.      -           LISTX(61),INTERX(70),SYNTAB(2,26),CHARX(26),TAG(50),
  26.      -           NEWSPT(58),ROWSYM(131),COLSYM(50)
  27.  
  28.  
  29. In most of the other files the subroutines that access this common block are
  30. declared the same way.  
  31.  
  32. Now I find in a file separate from the data file (the first one to declare what
  33. SHARE1 is like) a use of SHARE1 entirely different.  This is in the first
  34. SUBROUTINE in this src file that uses SHARE1 and every other routine that uses
  35. SHARE1 in this file also follows the convention below. 
  36.  
  37.       IMPLICIT INTEGER(A-Z)
  38.       COMMON/SHARE1/NSVT(1000),OSVT(1000),
  39.      -             OPND(3),LINE(133),UNUSE3(574),
  40.      -             OUTTAB(50,4),SUPP(100,2),SYMBL(2),UNUSE2(18)
  41.  
  42.  
  43. My original question still stands.  Since these declarations are not the same
  44. length nor (obviously) the same size arrays, is the second set of definitions
  45. concatenated to the first?  Or, because they are in separate files, and
  46. because in the second file(the odd man out file) the first declaration of
  47. SHARE1 is _not_ like the datafile definition, they are pointing to the same
  48. address space(ie TABLE(1) = NSVT(1) and OSVT(1) = TABLE(1001)
  49.  
  50. BTW, I am using a DECstation with Ultrix 4.3 and I am trying to stay as
  51. portable as possible. 
  52.  
  53.  
  54. He who will not reason, is a bigot; he who cannot is a fool;
  55. and he who dares not is a slave.      --- Sir William Drummond
  56.  
  57. Michael Lanham       mjlanham@eos.ncsu.edu   &  jumper@catt.ncsu.edu
  58.