Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Multiple C++ var definitions with ctor arguments

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
.oisyn Posted - Jan 27 2006 : 10:28:34 AM
When I define several variables with constructor arguments, like:

int i1(12), i2(34), i3(123);


It colors i1 as a function, and doesn't even recognize i2 and i3 (VA underlines them in red, and no symbol information is given when you use the identifiers i2 and i3. This is the problem I'd like to see fixed, the others are just minor details :)). So the parser seems to think they are functions instead of variables. Note that this is also the case the other way around:

typedef int myfunc();
myfunc a, b, c;


Now, it thinks that a, b and c are variables, while they are in fact just normal functions. But it does recognize all the symbols though, in contrast to my earlier problem.

I'm using VAX 1440 and VC++ 2003

VA_X.dll file version 10.2.1440.0 built 2006.01.17
Licensed to:
VA X: --snap-- (1-user license) Support ends 2006.10.25
VA.NET 7.1: --snap-- (1-user license)
VAOpsWin.dll version 1.3.2.0
VATE.dll version 1.0.4.12
DevEnv.exe version 7.10.3077.0
msenv.dll version 7.10.2304.0
Font: Courier New 13(Pixels)
Comctl32.dll version 5.82.2900.2180
WindowsNT 5.1 Build 2600 Service Pack 2
2 processors

Platform: Win32
Stable Includes:
C:\\Program Files\\Microsoft Xbox SDK\\Include;
C:\\Program Files\\Microsoft DirectX 9.0 SDK (October 2004)\\Include;
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\include;
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\include;
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\PlatformSDK\\include\\prerelease;
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\PlatformSDK\\include;
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\SDK\\v1.1\\include;

Library Includes:
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\src\\mfc;
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\src\\atl;
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\crt\\src;

Other Includes:

3   L A T E S T    R E P L I E S    (Newest First)
support Posted - Jun 19 2006 : 5:43:38 PM
Fixed in build 1524:

Global ints defined using () are no longer colored as methods. (case=976)
.oisyn Posted - Jan 30 2006 : 06:19:30 AM
quote:
are the variables global?

Yes they are. Didn't test local variables, but they indeed seem to work fine...

quote:
for the second effect, do you actually write code like that, or is this simply an example?

You mean the myfunc syntax? No, usually not, although I've used it once where I needed to declare a lot of different functions with the same signature (I don't think I was using VA then...). But the fact that it went wrong with variables it got me thinking, so I tried it for the functions.
feline Posted - Jan 29 2006 : 2:28:12 PM
are the variables global? i can only reproduce this effect with global C++ variables.

case=976

the colouring is a long known effect. the basic reason is that the code that does the colouring is very fast, it has to be to keep up with scrolling the code, and as a result it can only do very basic checks to help it guess what colour to use. the variables look like functions, so they get coloured as functions. this is on the list of things to look at, but i am not sure when this will happen.

for the second effect, do you actually write code like that, or is this simply an example?

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