17.05.2015 Views

TMS34010 C Compiler - Al Kossow's Bitsavers

TMS34010 C Compiler - Al Kossow's Bitsavers

TMS34010 C Compiler - Al Kossow's Bitsavers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Include Code from Another File Directive<br />

#include<br />

Syntax<br />

#include "filename"<br />

or<br />

#include <br />

Description<br />

The #include directive tells the preprocessor to read source statements from<br />

another file. The preprocessor includes (at the point in the code where<br />

#include is encountered) the contents of the filename, which are then processed.<br />

You can enclose the filename in double quotes or in angle brackets.<br />

The filename can be a complete path name or a filename with no path information.<br />

CD<br />

o<br />

If you provide path information for filename, the preprocessor uses<br />

that path and does not look for the file in any other directories.<br />

If you do not provide path information and you enclose the filename<br />

in double quotes, the preprocessor searches for the file in:<br />

1) The directory that contains the current source file. (The current<br />

source file refers to the file that is being processed when the<br />

preprocessor encounters the #include directive.)<br />

2) Any directories named with the -i preprocessor option.<br />

3) Any directories named with the C-DIR environment variable.<br />

(i)<br />

If you do not provide path information and you enclose the filename<br />

in angle brackets, the preprocessor searches for the file in:<br />

1) Any directories named with the -i preprocessor option.<br />

2) Any directories named with the C-DIR environment variable.<br />

Note:<br />

If vou enclose the filename in angle brackets, the preprocessor d'1es not<br />

search tor the file in the current direc'<br />

For more information about the -i option and the environment variable, read<br />

Section 3.1.3 on page 3-4.<br />

8-5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!