Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Syntax coloring problem...
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

johann83
Starting Member

1 Posts

Posted - Apr 30 2004 :  11:43:00 AM  Show Profile
I've been having a syntax coloring problem in VA X (on VC++ 6.0) since at least build 1223 and I sent email to support almost two months ago but the problem still persists. I wonder if anyone else has seen (or can reproduce) this problem. The basic issue is as follows:

Our code defines a constant (in a header constants.h) called FINDMARKER with a #define like so:
#define FINDMARKER 4
and also defines a function (in a header commands.h) called FindMarker with the following prototype:
int FindMarker(void);

In certain situations where both headers are included, the syntax coloring of the FINDMARKER value is incorrect. Typically, VA colors the value the default grey for variables as opposed to the purple for pre-processor defines (although I have seen it colored with the function color also). To make things more interesting, however, I have noted the following things...
  • The value is not always highlighted incorrectly.

  • The tooltip for the value is correct (i.e. it shows the #define), but the coloring in the tooltip is incorrect (it uses the function color).

  • The Visual Assist "Go" button lists three references when I click it for the FINDMARKER value (#define, function prototype, and function definition).


Now, some may say that you shouldn't have two different things with the same name, but I didn't write the code, I'm just the one stuck with maintaining it. Also, since the case is different, and the compiler obviously has no problems with it, I believe that VA should be able to correctly distinguish between them. I don't know the exact circumstances required to create this issue, but I was able to pare down my code to one C file and two headers and still demonstrate this problem. I emailed that project to support, but have not had any luck getting a response.

I'm hoping that a post here might result in a work-around, or some further exploration by support to see what the problem really is. I can provide the simple example project if anyone is interested.

Thanks,
Matt
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000