Re: Preprocessor includes, difference between quote and lt/gt



artifact.one@xxxxxxxxxxxxxx wrote:

What's the practical difference between:

#include <header.h>
and:
#include "header.h"

..besides the fact that in the second case, 'header.h' will be
used if it's in the current working directory?

Not so. Look at your system documentation. Note that <header.h>
need not access any file whatsoever. What the standard says is
(N869):

[#2] A preprocessing directive of the form

# include <h-char-sequence> new-line

searches a sequence of implementation-defined places for a
header identified uniquely by the specified sequence between
the < and > delimiters, and causes the replacement of that
directive by the entire contents of the header. How the
places are specified or the header identified is
implementation-defined.

[#3] A preprocessing directive of the form

# include "q-char-sequence" new-line

causes the replacement of that directive by the entire
contents of the source file identified by the specified
sequence between the " delimiters. The named source file is
searched for in an implementation-defined manner. If this
search is not supported, or if the search fails, the
directive is reprocessed as if it read

# include <h-char-sequence> new-line

with the identical contained sequence (including >
characters, if any) from the original directive.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>


.



Relevant Pages

  • Re: #include behavior
    ... possibility to place a source file into some place. ... a header identified uniquely by the specified sequence between the ... system in compiled program, not what compiler does. ...
    (comp.lang.c)
  • Re: #include behavior
    ... possibility to place a source file into some place. ... which ignores the mapping specified by 6.10.2. ... the source file identified by the specified sequence between the ...
    (comp.lang.c)
  • Re: Mail Merge Table keeps Resorting itself
    ... Word gets the sequence you want ... select Tools / Letters & Mailings / Mail Merge which opens up a step by step ... >> If the problem is with your your mailmerge source file, after>> switching the fields around in that file, did you save the changes? ...
    (microsoft.public.word.docmanagement)
  • Re: Hello
    ... VR of this tag and "00 E0" has to be the length of the value that ... sequence of items, where sequence and item have unknown length. ... The delimiters look like tags and have a lengh as well. ...
    (comp.protocols.dicom)
  • Re: Hello
    ... VR of this tag and "00 E0" has to be the length of the value that ... sequence of items, where sequence and item have unknown length. ... The delimiters look like tags and have a lengh as well. ...
    (comp.protocols.dicom)