home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!news.tek.com!psgrain!charnel!rat!usc!zaphod.mps.ohio-state.edu!uwm.edu!spool.mu.edu!news.cs.indiana.edu!nstn.ns.ca!cs.dal.ca!biome!silvert
- From: silvert@biome.bio.ns.ca (Bill Silvert)
- Subject: Re: Multiple includes
- Message-ID: <1992Nov10.213909.4759@biome.bio.ns.ca>
- Reply-To: silvert@biome.bio.dfo.ca (Bill Silvert)
- Organization: Habitat Ecology Div., Bedford Inst. Oceanography
- References: <1dotfaINN4a1@alnitak.usc.edu>
- Distribution: na
- Date: Tue, 10 Nov 1992 21:39:09 GMT
- Lines: 25
-
- In <1dotfaINN4a1@alnitak.usc.edu> olaf@alnitak.usc.edu (Olaf Meeuwissen) writes:
-
- >The reason for this is that I want to put all the maximum dimensions for the
- >arrays used in the program in one single file, so the user knows where to find
- >them if they have to be changed. Let's call this file `dim.h'. Now I have other
- >header files, say `lib.h' and `sys.h', that both contain some arrays, so I want
- >to include `dim.h'. Then, if I have to include both `lib.h' and `sys.h' in one
- >subroutine, yes, the compiler starts complaining! Of course, I get similar re-
- >sults if I want to include `dim.h' and any of the other header files.
-
- Not knowing what compiler you are using, an authoritative answer is not
- possible (include is non-standard). However, you might be able to use
- the trick that C includes do, namely:
-
- #ifndef DIM_H
- #define DIM_H
- ....
- #endif
-
- and run it through cpp or other preprocessor.
- --
- ------------------------------------------------------------------------
- William Silvert, Habitat Ecology Division, Bedford Inst. of Oceanography
- P. O. Box 1006, Dartmouth, Nova Scotia, CANADA B2Y 4A2. Tel. (902)426-1577
- InterNet Address: silvert@biome.bio.dfo.ca
-