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