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
 "i" is declared as a Macro
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

PatLuja
Tomato Guru

Belgium
416 Posts

Posted - Sep 21 2005 :  04:14:41 AM  Show Profile
Hello all,

For one of my projects, I had to include the boost libraries in VAX, so the macros and so where recognised within VAX. Since I've done this (a couple of months back), every time I use the variable name "i", it is coloured purple. Because somewhere in the boost library someone tried to be funny and declared i as a macro.
I don't think I have to mention that I use i a lot as name of an integer (only for a temporary counter for for-loops).

I want to ask if it would be inconvenient for one of you to let variable names existing of only one non-capital character not be recognised as a macro.
How does everyone feel about something like this? And would it be possible.

With kind regards,
Patrick Luja

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Sep 21 2005 :  3:37:06 PM  Show Profile
ideally VA should recognise that your local i is a variable, and colour it accordingly.

i have just tried this with VS 2003 and VA 1422. with the rather stupid macro:

#define i "hello world"

in a .h file, the code:


	char *pszString = i;


shows "i" in purple. however as soon as i add a for loop just below this, giving me:


char *pszString = i;
for(int i = 0; i < 10; i++) {
}


all instances of i are shown in bold black. so i have the same problem in reverse. unless there is a proper example i think i will ignore this particular problem

hopefully when you are able to move to VA 14xx this will fix the problem. i do agree though, this is a rather stupid macro to have defined.

zen is the art of being at one with the two'ness
Go to Top of Page
  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