Breyta

Deila með


Preprocessor

The preprocessor is a text processor that manipulates the text of a source file as part of the first phase of translation. The preprocessor doesn't parse the source text, but it does break it up into tokens to locate macro calls. Although the compiler ordinarily invokes the preprocessor in its first pass, the preprocessor can also be invoked separately to process text without compiling.

The reference material on the preprocessor includes the following sections:

Microsoft Specific

You can obtain a listing of your source code after preprocessing by using the /E or /EP compiler option. Both options invoke the preprocessor and send the resulting text to the standard output device, which, in most cases, is the console. The difference between the two options is that /E includes #line directives, and /EP strips out these directives.

END Microsoft Specific

Special terminology

In the preprocessor documentation, the term "argument" refers to the entity that is passed to a function. In some cases, it's modified by "actual" or "formal," which describes the argument expression specified in the function call, and the argument declaration specified in the function definition, respectively.

The term "variable" refers to a simple C-type data object. The term "object" refers to both C++ objects and variables; it's an inclusive term.

See also

C/C++ preprocessor reference
Phases of translation