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
 VAX has problems following #define inside structs
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

cianflon
New Member

7 Posts

Posted - Mar 22 2005 :  6:05:02 PM  Show Profile
I have VAX build 1298. The following code is compiled with Visual Studio 6.0. The first two #defines make a couple of strings, then the structures at the end simply put those strings into some structs. We're using C only for our code, no C++.
If I create a ContentRec struct (which now has 4 char * members in it), like so:

ContentRec stContentRec;

then start typing the structure name and put a dot, (like stContentRec. ) VAX doesn't understand what's inside the structure and doesn't show anything.






#define INHERIT_LITE_ATTRIB \ /* ASCII Strings */ \ char *pszPath; \ char *pszName

#define INHERIT_OTHER_ATTRIB \ /* ASCII Strings */ \ char *pszLocation; \ char *pszDestination;



// lightweight struct with minimal attributes
typedef struct
{
INHERIT_LITE_ATTRIB;

} ContentRecLite;


// full struct with all the attributes
typedef struct
{
INHERIT_LITE_ATTRIB;
INHERIT_OTHER_ATTRIB;

} ContentRec;

Baga
Tomato Guru

122 Posts

Posted - Mar 22 2005 :  7:39:44 PM  Show Profile
I don't know if it is related - INHERIT_OTHER_ATTRIB has ; at the end, while the way you use it it should not
Go to Top of Page

cianflon
New Member

7 Posts

Posted - Mar 23 2005 :  2:23:35 PM  Show Profile
That was a mistake by me in cutting and pasting to this message window. There really isn't a ";" at the end of the #define for INHERIT_OTHER_ATTRIB.

So the correct code is(see if I can paste it here properly ;-)





#define INHERIT_LITE_ATTRIB \/* ASCII Strings */ \char *pszPath; \char *pszName

#define INHERIT_OTHER_ATTRIB \/* ASCII Strings */ \char *pszLocation; \char *pszDestination



// lightweight struct with minimal attributes
typedef struct
{
INHERIT_LITE_ATTRIB;

} ContentRecLite;


// full struct with all the attributes
typedef struct
{
INHERIT_LITE_ATTRIB;
INHERIT_OTHER_ATTRIB;

} ContentRec;
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Mar 28 2005 :  2:21:55 PM  Show Profile
confirmed. i started testing this under .NET 2003 with VAX 1299 for ease. in .NET 2003 you get the correct suggestions when pressing CTRL-SPACE after the dot, but not when you press the dot, which seems odd.

case=542

this is relevant since it shows VAX is capable of parsing this code correctly.

however i cannot get 1299 to produce a completion listbox in VC6 at all.

case=543

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