Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!sunybcs!boulder!gore!jacob From: jacob@gore.com (Jacob Gore) Newsgroups: comp.lang.c Subject: Re: A solution to the multiple inclusion problem Message-ID: <470005@gore.com> Date: 24 Oct 89 18:14:07 GMT References: <14240@well.UUCP> Reply-To: jacob@gore.com (Jacob Gore) Organization: Gore Enterprises Lines: 15 / comp.lang.c / mgordon@lotus.com (PCSD Mac) / Oct 24, 1989 / How about a new preprocessor directive that means "include this file only if it hasn't already been included", say "#require"? The "preprocessor" would simply keep a table of files that have already been included and use it to avoid including the same #required file more than once. There will always be files you really do want to #include multiple times, so you can't change the meaning of #include. ---------- Objective-C uses "#import" for just this. It's very convenient. (And portable to all Objective-C implementations:-) Jacob -- Jacob Gore Jacob@Gore.Com boulder!gore!jacob