Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 VAX can't find local variables in macroses

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
AGL Posted - Mar 01 2006 : 12:57:48 AM
Hi
I'm using VAX 1440 under VS6
There are still stable error in VAX, it can't correctly parse macroses with declarations of variables.

Check following example:
#define DR int ii; double dd;
void main(){
DR;
ii=0; dd=0.0;
}

VAX can't tell where was "ii" and "dd" defined.
1   L A T E S T    R E P L I E S    (Newest First)
support Posted - Mar 01 2006 : 7:55:58 PM
VA X is behaving this way by design. Your example is a bit unusual. More likely, you'd have:

#define BIGINT int
BIGINT foo;

When you click foo, you want to see BIGINT as the definition of foo, not int. (Remember, VA X is trying to help while editing; it's not compiling.)

Macros #defined using ()'s do get resolved one level when used in definitions. This is done for several reasons, and one applies to your example. If you want VA X to resolve a macro used in a definition, include parens with it.

#define BIGINT() int
BIGINT() foo;

Click on foo and you see int.

The resolving of macros one level during edit is done by default and in most cases, causes VA X to understand variable definitions to the extent you want.

In your case, try:

#define DR() int ii; double dd;
DR();
ii=0;

VA X will know what ii is.

If you have a more complex example, post it and we might suggest a better workaround. (Some hacks are done via our stdafx.h.)

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