Preprocessor
Commands that control the preprocessor.
Description
Preprocessor commands are sent to the compiler to control what gets compiled and how. They can be used to choose to compile one block of code rather than another for cross-platform compatibility, include headers or other source files, define small inline functions called macros, or alter how the compiler handles variables.
Conditional CompilationCommands that allow for branches in compilation based on conditions.
Text ReplacementCommands that create text-replacement macros.
File DirectivesCommands that indicate to the compiler how other files relate to the source file.
Control DirectivesCommands that set compile options, control compilation, and report compile time information.
MetacommandsCommands that are kept for backward compatibility.
Conditional Compilation #if Text ReplacementCompiles the following code block based on a condition. #ifdefCompiles the following code block if a symbol is defined. #ifndefCompiles the following code block if a symbol is not defined. #elseifCompiles the following code block if a condition is true and the previous conditions was false. #elseCompiles the following code block if previous conditions were false. #endifSignifies the end of a code block. definedReturns "-1" if a symbol is defined, otherwise "0". #define Creates a single-line text-replacement macro. #macro and #endmacroCreates a multi-line text-replacement macro. #undefUndefines a symbol. # Preprocessor StringizeConverts text into a string literal. ## Preprocessor ConcatenateConcatenates two pieces of text. ! Escaped String LiteralIndicates string literal immediately following must be processed for escape sequences. $ Non-Escaped String LiteralIndicates string literal immediately following must not be processed for escape sequences. | File Directives #include Control DirectivesInserts text from a file. #inclibIncludes a library in the linking processes. #libpathIncludes a path to search for libraries in the linking process. #pragma MetacommandsSets compiling options. #langSets dialect from source. #printOutputs a messages to standard output while compiling. #errorOutputs a messages to standard output and stops compilation. #AssertStops compilation with an error message if a given condition is false. #lineSets the current line number and file name. '$Include Alternate form of the #include directive. '$DynamicAlternate form of the Option Dynamic statement. '$StaticAlternate form of the Option Static statement. '$Lang |