#define (XYZ) grays out code

Comments

5 comments

  • Avatar
    Rob Niblett

    same occurs if you use #ifdef (XYZ)

    0
    Comment actions Permalink
  • Avatar
    Rob Niblett

    This still happens in V4.2. Great support this!

    0
    Comment actions Permalink
  • Avatar
    Jon Elliott

    If the #if is in a header file and the definition has been made using the Preprocessor Definitions project property, make sure the header file is added to the project otherwise CrossStudio will not know what definitions to apply to the file.

    0
    Comment actions Permalink
  • Avatar
    Rob Niblett

    XYZ is in the Preprocessor Definitions

    #ifdef (XYZ)

    code_here....

    #endif

    "code_here" 50% of the time will be grayed out. if I add #define XYZ to the top of the file and then immediately remove it, the code appears as normal. It's a bug! It comes and goes..

    0
    Comment actions Permalink
  • Avatar
    Rob Niblett

    I have several projects in my solution which have different  Preprocessor Definitions, maybe its that that confuses the IDE.

    Its purely a visual thing because the code that is greyed out does compile and gets linked in (go figure)

    0
    Comment actions Permalink

Please sign in to leave a comment.