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
 Missing second parameter suggestion
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jesko
New Member

4 Posts

Posted - Apr 10 2007 :  09:32:50 AM  Show Profile  Reply with Quote
Missing second parameter suggestion in VA 1549

Hello,

I have created a test project to show the error. In the bar class you can select the member function "c" and it will suggest you the first parameter "char abc" but not the second "int def".

Greets
JSC

foo.cpp ============================================================

#include <foo.h>

bar::bar()
{
}

bar::~bar()
{
}

void
bar::a()
{
}

void
bar::b( int abc )
{
}

void
bar::c( char abc, int def )
{
}


foo.h ==============================================================

class bar
{
  public:
    bar();
    ~bar();

    void
      a(),
      b( int abc ),
      c( char abc, int def );
};


main.cpp ===========================================================

int
main()
{
  bar
    Test;

  Test.a();
  Test.b( 1 );
  Test.c( 1, 2 ); //< no 2nd parameter suggestion here
  return 0;
}

feline
Whole Tomato Software

United Kingdom
18951 Posts

Posted - Apr 10 2007 :  10:22:06 AM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=5914

For now the solution is to change the code, so that each of the member functions is declared on a line of its own, rather than having this shared return type.

zen is the art of being at one with the two'ness
Go to Top of Page

jesko
New Member

4 Posts

Posted - Apr 10 2007 :  10:31:06 AM  Show Profile  Reply with Quote
I know this already. Thanks for your reply !
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18951 Posts

Posted - Apr 10 2007 :  12:36:04 PM  Show Profile  Reply with Quote
I guessed you would know the solution, but it is a bad idea to assume things like that

I went away and tested compiling this, just to see if it would work, since I don't recognise this syntax. It makes sense thinking of variables, but I tend to think of variables and functions as different things, to be treated differently.

zen is the art of being at one with the two'ness
Go to Top of Page

jesko
New Member

4 Posts

Posted - Apr 10 2007 :  12:48:11 PM  Show Profile  Reply with Quote
Yes, I know this type of syntax is a little bit unusual, but I like to group variables by their types and functions by their return type.
It is totally correct to do so - but as I said - unusual.

I would advise you to test VisualAssist against constructs from here:
http://www.arkko.com/ioccc.html

If this works, you can be sure it works nearly always ;-)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18951 Posts

Posted - Apr 12 2007 :  07:59:38 AM  Show Profile  Reply with Quote
*ah* that place. I think we will leave that for a while, we can have enough fun with normal, clear code

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000