Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!uc!nic.MR.NET!hal!ncoast!allbery From: allbery@NCoast.ORG (Brandon S. Allbery) Newsgroups: comp.lang.c Subject: Re: A solution to the multiple inclusion problem Message-ID: <1989Oct25.235432.4261@NCoast.ORG> Date: 25 Oct 89 23:54:32 GMT References: <14240@well.UUCP> <1989Oct23.191634.6345@cs.rochester.edu> <1659@atanasoff.cs.iastate.edu> <14790@bfmny0.UU.NET> Reply-To: allbery@ncoast.ORG (Brandon S. Allbery) Followup-To: comp.lang.c Distribution: comp Organization: North Coast Public Access UN*X, Cleveland, OH Lines: 25 As quoted from <14790@bfmny0.UU.NET> by tneff@bfmny0.UU.NET (Tom Neff): +--------------- | In article <1659@atanasoff.cs.iastate.edu> hascall@atanasoff.UUCP (John Hascall) writes: | > Since the impending ANSI standard requires that including a file more | > than once have exactly the same effect as including it once...why can't | > a compiler just ignore #includes for files it has already #included??? | | Including standard HEADER files should be idempotent. Back here in the | real world there are plenty of uses for including a file multiple times | with a desired substantial effect on each inclusion. Examples include +--------------- Agreed. I have simulated packages this way, e.g. #define PACKAGE_NAME foo #define PACKAGE_TYPE float #include "package.h" ++Brandon -- Brandon S. Allbery: allbery@NCoast.ORG, BALLBERY (MCI Mail), ALLBERY (Delphi) uunet!hal.cwru.edu!ncoast!allbery ncoast!allbery@hal.cwru.edu bsa@telotech.uucp *(comp.sources.misc mail to comp-sources-misc[-request]@backbone.site, please)* *Third party vote-collection service: send mail to allbery@uunet.uu.net (ONLY)* >>> Shall we try for comp.protocols.tcp-ip.eniac next, Richard? <<<