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
 C++ function typedefs
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

tasjaevan
New Member

3 Posts

Posted - Jan 18 2005 :  11:44:32 AM  Show Profile
Visual Assist X does not recognise typedefs of function types or function pointers, e.g.

typedef void f();
typedef void (*g)();

f and g do not adopt the 'class, structures and typedefs' colour as they should.

WannabeeDeveloper
Tomato Guru

Germany
775 Posts

Posted - Jan 18 2005 :  12:47:09 PM  Show Profile
They're colored "Maroon" (Brown) on my system, like all methods...

I'd say this is absolutely okay, since they are pointers to methods(functions), or am I wrong?


Go to Top of Page

tasjaevan
New Member

3 Posts

Posted - Jan 18 2005 :  1:01:45 PM  Show Profile
Oh yes, my mistake. My regular editor colour is closer to my method colour than I realised. Visual Assist does recognise them after all.

All the same, I would have expected the colour to be the typedef colour. In your example, LPtsrGetLastError is a pointer type, and you can't call it like a method: LPtsrGetLastError() doesn't make any sense.
Go to Top of Page

WannabeeDeveloper
Tomato Guru

Germany
775 Posts

Posted - Jan 18 2005 :  1:51:46 PM  Show Profile
Hmm... agree, you're leading 1:0

I'll point one of the devs into this Topic, maybe they have an explanation (or confirmation that it's a bug).

But, look at this one (Screenshot is from a .cpp which includes the header the first screenshot is from):
Notice tsrGetVersion!


There, it's colored fine and as expected... strange, huh?


Edited by - WannabeeDeveloper on Jan 18 2005 1:58:16 PM
Go to Top of Page

tasjaevan
New Member

3 Posts

Posted - Jan 19 2005 :  05:54:48 AM  Show Profile
That's what I expected. 'tsrGetVersion' is actually a function pointer, which colour fine. (It's another discussion whether function pointers should look like variables or methods when being called - I don't have a problem with the current scheme, although I'd personally have coloured them as variables.)

It's the function pointer typedefs (e.g. LPtsrGetLastError, LPtsrConnect) which get coloured (incorrectly IMO) as a function/method rather than a class/typedef.
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