INCLUDE - how inclusion rules work.

There are two forms of the #include directive. Both forms have the effect of reading in a file and replacing the #include directive with the contents of the file (presumably C source code). The difference between the two is the way in which they search for the file whose contents you want to include.

#include "file"

begins searching for the desired file in the catalog that contains the original source file. If the inclusion file is not found under this catalog, C continues its search under the catalog

C_G8_NS/8CV1.3/INCLUDE

This catalog contains a number of standard "inclusion files" that are part of the multi-segment C software package.

When the form of the #include directive is

#include <file>

C does not bother searching the catalog that contained the original source file. Instead, it goes directly to C_G8_NS/8CV1.3/INCLUDE. This is the usual way to obtain a standard inclusion file, e.g.

#include <stdio.h>

If it ever becomes necessary for you to examine the contents of a standard #include file (e.g. to find out the actual value of a manifest symbol), simply read the appropriate file. For example, if you want to examine <stdio.h>, look at

c_g8_ns/8cv1.3/include/stdio.h

Copyright © 1996, Thinkage Ltd.