#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 switches off the special handling of # as a string constructor, and is valid for the remainder of the file in which it appears. This is useful when 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, the Compiler handles # as a string constructor, which is undesired behavior.

Listing: Using a NO_STRING_CONSTR Pragma to Alter the Meaning of #
#pragma NO_STRING_CONSTR
#define HALT(x)   __asm { \

                    LOAD Reg,#3 \

                    HALT x, #255\

                  }
See also

Using Immediate-Addressing Mode in HLI Assembler Macros