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.) |
|
|