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

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!caen!sol.ctr.columbia.edu!news.cs.columbia.edu!cs.columbia.edu!moniot
  3. From: moniot@dsm.dsm.fordham.edu (Robert Moniot)
  4. Subject: Re: Help With Named common blocks...again
  5. In-Reply-To: jumper@garfield.catt.ncsu.edu's message of Wed, 16 Dec 1992 03:19:54 GMT
  6. Message-ID: <MONIOT.92Dec16120247@dsm.dsm.fordham.edu>
  7. Sender: news@cs.columbia.edu (The Daily News)
  8. Organization: Fordham University/CLC, Division of Science and Math
  9. References: <jumper.724475994@garfield.catt.ncsu.edu>
  10. Distribution: comp
  11. Date: Wed, 16 Dec 1992 17:02:47 GMT
  12. Lines: 43
  13.  
  14. In article <jumper.724475994@garfield.catt.ncsu.edu>
  15. jumper@garfield.catt.ncsu.edu (Michael Lanham) writes:
  16.  
  17.  
  18. > Let me start over.  I have a program that has several source files.  The data
  19. > module consists entirely of a BLOCK DATA segment.
  20.  
  21. > In that data module there is a COMMON block that looks like the following.
  22.  
  23.    [stuff omitted]
  24.  
  25.  
  26. > Now I find in a file separate from the data file (the first one to declare what
  27. > SHARE1 is like) a use of SHARE1 entirely different.
  28.  
  29. Someone may already have said this in a reply, but if so I missed it:
  30.  
  31. The example given is not standard conforming because the block
  32. declarations are of different lengths.  Section 8.3.3 says "Within an
  33. executable program, all named common blocks that have the same name
  34. must be the same size."
  35.  
  36. This rule does not apply to blank common, which is probably why many
  37. people don't remember that it does apply to named common.
  38.  
  39. Also, some of the variables in the common blocks had names like
  40. CHAR(n).  If there were accompanying declarations (not shown)
  41. declaring these variables to be of type CHARACTER, then the example is
  42. also not standard conforming due to mixing character and numeric types
  43. in the same block.   See Section 8.3.1.
  44.  
  45.  
  46.  
  47. --
  48.  
  49.  
  50. Bob Moniot
  51. Fordham University
  52. College at Lincoln Center
  53. New York, NY  10023  (212) 636-6331
  54.  
  55. BitNet:   MONIOT@FORDMULC
  56. InterNet: moniot@mary.fordham.edu
  57.