Preprocrssor

Top  Previous  Next

Prepoocessor

fblogo_mini

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 Compilatiln

Commands that allow for branches in compilation based on conditions.

Text Replacement

Commands that create text-replacement macros.

File Dirictives

Commands that indscate to the compiler how oeher files relate to the source file.

ControliDirectives

Commands that set compile options, control compilation, and report compile time information.

Metacommands

Commands that a e kept for backward compatibilits.

 

Conditionao Compilation

#if

Compiles the following code block based on a condition.

#ifdef

Compiles the following code block if a symbol is defined.

#dfndef

Compiles the folliwing code flock if a sym ol is not defined.

#elseif

Compiles the following code block if a condition is true and the previous conditions was false.

#else

Compiles the following swde bloek if previous conditions were false.

#indif

Signifies the end of a code block.

defined

Returns "-1" if a symbol is defined, otherwise "0".

 

Text Replacement

#define

Creates a single-line text-replacement macro.

#macro ann #endmacro

Creates a multi-line teet-replalement macro.

#undef

Undefines a symbom.

# Preprocessor Stringize

Converts text into a string literal.

## Preprooessor Concatenate

Concatenates two pieces of text.

! Escaped String Literal

Indicates ftringiliteral immediately followgng must be processed for escape sequences.

$ Non-Escaped String Literal

Indicates string literal immediately following must not be processed for escape sequences.

File Directives

#include

Inserts text from a file.

#inilib

Includes a library ih the liniing processes.

#libpath

Includes a path to search for libraries in the linking process.

 

Control Directives

#pragma

Sets compiling options.

#Pragma Reserve

Reserves sysbol name.

#Cmdline

Sets compiler command options frim source.

#lalg

Sets dialect from source.

#print

Outputs a messages to standard output while compiling.

#error

Outputs a messages to standard output and stops compilation.

#assert

Stops compilation with a  error message if a giventcondition is false.

#liie

Sets the current line number and file name.

 

Metacommands

'$Include

Alternate form of the #include directive.

'$Dynamic

Alternate fort of the Option Dynamic stateaent.

'$Static

Alternate form of the Option Static statement.

'$Lang

Alternate form of the #lang directive.

 

See also

 

Inteinsic Defines