home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / fortran / 4980 < prev    next >
Encoding:
Text File  |  1993-01-12  |  1.7 KB  |  31 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!utcsri!helios.physics.utoronto.ca!alchemy.chem.utoronto.ca!system
  3. From: system@alchemy.chem.utoronto.ca (System Admin (Mike Peterson))
  4. Subject: Re: Block Data
  5. Message-ID: <1993Jan12.183138.22851@alchemy.chem.utoronto.ca>
  6. Organization: University of Toronto Chemistry Department
  7. References: <C0pDpw.AxK@fs7.ece.cmu.edu> <weiping.51.726797868@eng2.eng.monash.edu.au>
  8. Date: Tue, 12 Jan 1993 18:31:38 GMT
  9. Lines: 20
  10.  
  11. In article <weiping.51.726797868@eng2.eng.monash.edu.au> weiping@eng2.eng.monash.edu.au (Weiping Hu Materials) writes:
  12. >In article <C0pDpw.AxK@fs7.ece.cmu.edu> winstead@faraday.ece.cmu.edu (Charles Holden Winstead) writes:
  13. >>that I'd like to place into separate files and link their object files at
  14. >>compilation, and I was wondering how to handle common blocks and this 
  15. >>block data section.
  16. >
  17. >Just treat the block data section as a subroutine, or keep it with the main 
  18. >program.  The variable reference will be resolved at link time.
  19.  
  20. This will work fine as long as you directly link the object file; some
  21. UNIX systems will not be able to extract a BLOCK DATA routine from
  22. a library, even if you give the BLOCK DATA a name. Sometimes you can
  23. get around this by putting an EXTERNAL statement in the main program
  24. which names the BLOCK DATA, but some compilers eliminate the external
  25. reference if you don't actually call the routine (or at least use the
  26. external name in a subroutine call).
  27. -- 
  28. core error - bus dumped    -*-    Mike Peterson, SysAdmin, U/Toronto Chemistry
  29.  *******   As usual, I speak only for me, myself and I; nobody else   *******
  30. E-mail: system@alchemy.chem.utoronto.ca  Tel: (416)978-7094  Fax: (416)978-8775
  31.