Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 BUG: Macros > 10 params

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Dracola Posted - Feb 25 2011 : 12:06:58 AM
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++
4   L A T E S T    R E P L I E S    (Newest First)
support Posted - Mar 17 2011 : 11:48:51 PM
case=55561 is fixed in build 1845
feline Posted - Feb 25 2011 : 2:09:34 PM
That makes more sense, since this did seem an odd approach if you just wanted to create an enum on its own.
Dracola Posted - Feb 25 2011 : 1:14:25 PM
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.
feline Posted - Feb 25 2011 : 1:11:59 PM
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.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000