Pretreatment instruction

The term "pre-command" only for consistency with the C and C ++ programming language. No separate pretreatment step in C #; part preprocessing directives are processed in the lexical analysis stage.

pp-declaration (pp statement)

pp-conditional (pp condition)

pp-line (pp row)

pp -diagnostic (pp diagnostics)

pp-region (pp region)

Pretreatment instruction

the following preprocessing directives are available:

#define and #undef, respectively to define and undefine conditional compilation symbols.

# if, # elif, # else and #endif, a conditional skip sections of source code.

#line, for controlling the line numbers (use the release of the error and warning messages).

#error and #warning, respectively, and for issuing an error warning.

#region and #endregion, are used to explicitly tag in the source code.

preprocessing instructions always occupies a separate line in the source code and always begins with a # character preprocessing and instruction name. Whitespace can occur between the front and # # character and command name characters.

containing # define, # undef, # if, # elif, # else, # endif #line instruction or source line can end with a single-line comment. On the source line containing the instruction does not allow pre-delimited comment (/ * * / style comments).

preprocessing directives are not labeled, and are not part of the syntactic grammar C #. However, marker sequences may include or exclude pretreatment instructions, and may affect the meaning of a C # program in this manner.

Related Articles
TOP