|
|
HP C/HP-UX Reference Manual: Version A.05.55.02 > Chapter 7 Preprocessing
Directives _Pragma |
|
_Pragma is a preprocessing unary operator. Syntax_Pragma (string-literal) _Pragma is a new preprocessing operator and is a part of C99 standards. The string literal is destringized by deleting the L prefix, if present. _Pragma deletes the leading and trailing double quotes, replacing each escape sequence by a double-quote, and replacing the escape sequence by a single backlash. The resulting sequence of characters is processed to produce preprocessor tokens that are executed as if they were preprocessed tokens in a pragma directive. The _Pragma operator provides portability in the use of an existing #pragma C preprocessor construct. These pragmas are processed as defined in its implementation. Most C implementations provide pragmas that are very similar in meaning and functionality. The _Pragma operator can be used in the replacement text of a macro, so as to aid in abstracting these specific pragmas a level higher. The following examples list the usage of the _Pragma operator: Example 7-1 _Pragma Operator Usage A directive of the form, #pragma listing on "..\listing.dir" can also be expressed as, _Pragma (listing on \"..\\listing.dir\"") The latter form is processed as earlier, if it appears literally as shown or it results from macro replacement, as in:
|
|