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
 1626: #if 0 mixed with // breaks method list
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Rasmuss
Senior Member

33 Posts

Posted - Apr 02 2008 :  05:26:53 AM  Show Profile  Reply with Quote
We have a file where the method list does not list all methods. I have investigated and distilled a test case for you here to show the problem.

The following piece of code will only make Test::Test1() show in the method list. All methods after this will not be shown.


bool Test::Test1()
{
	bool bTest = true;
#if 0
	int iTest = 0;
	for(iTest = 0; iTest < 10; iTest++) {
		bTest = true;
#endif
//	}

	return bTest;
}

void Test::Test2()
{
}


The offending code is the for loop, and if it is commented out Test::Test2() will show up in the method list:


bool Test::Test1()
{
	bool bTest = true;
#if 0
	int iTest = 0;
//	for(iTest = 0; iTest < 10; iTest++) {
		bTest = true;
#endif
//	}

	return bTest;
}

void Test::Test2()
{
}


Also if the ending braces are surrounded by an #if 0 instead, the Test::Test2() function will also show up in the method list:


bool Test::Test1()
{
	bool bTest = true;
#if 0
	int iTest = 0;
	for(iTest = 0; iTest < 10; iTest++) {
		bTest = true;
#endif
#if 0
	}
#endif

	return bTest;
}

void Test::Test2()
{
}


I hope this is a bug that can be fixed, since the method list is my primary way of navigating large files.

Regards,
Rasmus Sigsgaard

---
VA_X.dll file version 10.4.1626.1 built 2008.01.17
Licensed to:
VA X: ioi.dk (45-user license) Support ends 2009.05.30
DevEnv.exe version 8.0.50727.762
msenv.dll version 8.0.50727.762
Font: Courier New 13(Pixels)
Comctl32.dll version 6.0.2900.2982
Windows XP 5.1 Build 2600 Service Pack 2
8 processors

Platform: Win32
Stable Includes:
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\include;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\include;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\PlatformSDK\\include;
C:\\Program Files\\Microsoft Visual Studio 8\\SDK\\v2.0\\include;

Other Includes:

Stable Source Directories:
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfc;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfcm;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\atl;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\crt\\src;

feline
Whole Tomato Software

United Kingdom
19001 Posts

Posted - Apr 02 2008 :  6:49:15 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=3498

The #if 0 mixed with // is actually confusing the problem. The problem is the unmatched curly brackets inside the function. You can simplify the code down to:

static void listedFunction1()
{
#if 0
	{
		{
#endif
}

static void invisibleFunction1()		{ }

which is what you have, since when you commented out the closing bracket. For now I would suggest selecting code and using * or / to comment out the code, so that you have commented out both the opening and closing brackets.

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

Rasmuss
Senior Member

33 Posts

Posted - Apr 03 2008 :  03:30:53 AM  Show Profile  Reply with Quote
Thank you. I have made a temporary fix to the largest "broken" files I use the most, but since we have a lot of people working on the same code I'm hoping that VAX will be able to handle this kind of situation.
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