#pragma NO_STRING_CONSTR: No String Concatenation during preprocessing

Scope

Compilation Unit

Syntax

#pragma NO_STRING_CONSTR

Synonym

None

Arguments

None

Default

None

Description

This pragma is valid for the rest of the file in which it appears. It switches off the special handling of # as a string constructor. This is useful if a macro contains inline assembler statements using this character, e.g., for IMMEDIATE values.

Example

The following pseudo assembly-code macro shows the use of the pragma. Without the pragma, # is handled as a string constructor, which is not the desired behavior.

Listing: Using a NO_STRING_CONSTR pragma in order to alter the meaning of #


#pragma NO_STRING_CONSTR 
#define HALT(x) __asm { \ 
 LOAD Reg,#3 \ 
 HALT x, #255\ 
 } 
See also

Using the Immediate-Addressing Mode in HLI Assembler Macros