Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!uxe.cso.uiuc.edu!mcdonald From: mcdonald@uxe.cso.uiuc.edu Newsgroups: comp.lang.c Subject: Re: A solution to the multiple inclusio Message-ID: <225800235@uxe.cso.uiuc.edu> Date: 29 Oct 89 17:08:00 GMT References: <14240@well.UUCP> Lines: 32 Nf-ID: #R:well.UUCP:14240:uxe.cso.uiuc.edu:225800235:000:1067 Nf-From: uxe.cso.uiuc.edu!mcdonald Oct 29 11:08:00 1989 > > #include FRED_H > Please be alert for problems. K&R requires the token after the > "#include" to be a filename enclosed in double quotes or angle > brackets, not an arbitrary symbol. Quoted without permission from "The C Programming Language" by Kernighan and Ritchie, Prentice Hall, copyright 1988 (page231): Finally, a directive of the form # include token-sequence not matching one of the previous formsis interpreted by expanding the token sequence as for normal text; one of the two forms with <...> or "..." must result, and it is then treated as described previously" So, if FRED_H expands to "fred.h" it is perfectly legal. If is stays as-is, it is illegal. Another question arises: earlier K&R say "The characters in the filename must not include > [if it started with <] or the newline and the effect in undefined if it contains any of ", ',\, or /*." Shouldn't that be "implementation defined" rather than undefined - the most common operating system in the world uses "\" as a file path separator. Doug McDonald