Xref: utzoo comp.lang.c:23218 comp.lang.c++:5198 Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!uwm.edu!cs.utexas.edu!uunet!cimshop!davidm From: cimshop!davidm@uunet.UU.NET (David S. Masterson) Newsgroups: comp.lang.c,comp.lang.c++ Subject: Re: A solution to the multiple inclusion problem Message-ID: Date: 24 Oct 89 17:19:14 GMT References: <14240@well.UUCP> <1989Oct23.191634.6345@cs.rochester.edu> <1659@atanasoff.cs.iastate.edu> Sender: davidm@cimshop.UUCP Distribution: comp Organization: Consilium Inc., Mountain View, California. Lines: 29 In-reply-to: hascall@atanasoff.cs.iastate.edu's message of 24 Oct 89 00:24:04 GMT In article <1659@atanasoff.cs.iastate.edu> hascall@atanasoff.cs.iastate.edu (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??? (at least for the "standard" includes) Any comments from the ANSI mavens? What???? (I hope this isn't true) Doesn't the "#if" mechanism suggest that it is very possible to include a file more than once and have different things happen? For instance (not a really good example, though): setup.h: main.c: #ifdef GENERIC #define GENERIC #define INTSIZE 16 #include "setup.h" #endif #ifdef VAX processor.c #define INTSIZE 32 #define VAX #endif #include "setup.h" -- =================================================================== David Masterson Consilium, Inc. uunet!cimshop!davidm Mt. View, CA 94043 =================================================================== "Nobody here but us chickens..."