C compiler preprocessors


Preprocessor commands are executed before the compiler compiles the source code. These commands will change the original code usually to suit the operating environment and/or to add code that will be required by calls to library functions. Preprocessors are recognised by the leading # in their names.

Preprocessors
#include Insert a source file.
#define Define a preprocessor constant.
#if Branch based on an expression.
#ifdef Branch if preprocessor constant has been defined?
#ifndef Branch is a preprocessor constant has NOT been defined.
#line Specify the number of the next source line.
#undef Remove a preprocessor constant.
#pragma Perform an implementation dependent action???
#else Executed if #if #ifdef or #ifndef fails.
#error Write an error message.
#elif Executed when an #if fails.
#endif Close #if #ifdef or #ifndef


Notes:


Top Master Index Keywords Functions


Martin Leslie