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
 BUG: Macros > 10 params
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Dracola
Junior Member

15 Posts

Posted - Feb 25 2011 :  12:06:58 AM  Show Profile  Reply with Quote
I'm trying to create an enum with a macro ex.


As you can see VAX recognizes all except Car2, the last parameter. Enum11 likewise will not recognize the last two parameters.

Here's the code in text.

#define ENUM(name,...)\  enum name{__VA_ARGS__};
ENUM(Hello, Hi, Bye, Later, Woah, Hey, There, Argh, Lost, Car );
#define ENUM10(name,P1,P2,P3,P4,P5,P6,P7,P8,PNOTRECOGNIZED2)\  enum name{P1,P2,P3,P4,P5,P6,P7,P8,PNOTRECOGNIZED2};
ENUM10(WhyHi, Hi2, Bye2, Later2, Woah2, Hey2, Ther2e, Argh2, Lost2, Car2 );


You can see I also attempted a macro var args version, but this didn't work at all. It would be nice if support for this is added.

I also turned off LimitMacroParsing, but that didn't help.

Thanks in advance.

edit:
Visual Studio 2008
VAX 10.6.1837.0 built 2010.11.19
(slightly out of date, ran out of updates will renew if this is fixed)
Language: c++

Edited by - Dracola on Feb 25 2011 12:09:35 AM

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Feb 25 2011 :  1:11:59 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=55561

As a work around for the item "Car2" not being listed in the listbox, turning on:

VA Options -> Advanced -> Listboxes -> Get content from default Intellisense

helps for me.

Out of interest, why are you using a macro to create an enum? Off hand I am not sure why you would want to do this.

zen is the art of being at one with the two'ness
Go to Top of Page

Dracola
Junior Member

15 Posts

Posted - Feb 25 2011 :  1:14:25 PM  Show Profile  Reply with Quote
I am using it for reflection. In addition to making an enum I also do some other stuff with the parameters that binds them to lua and my serialialization system.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Feb 25 2011 :  2:09:34 PM  Show Profile  Reply with Quote
That makes more sense, since this did seem an odd approach if you just wanted to create an enum on its own.

zen is the art of being at one with the two'ness
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Mar 17 2011 :  11:48:51 PM  Show Profile  Reply with Quote
case=55561 is fixed in build 1845

Whole Tomato Software, Inc.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000