Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1626: #if 0 mixed with // breaks method list

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
Rasmuss Posted - Apr 02 2008 : 05:26:53 AM
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;

2   L A T E S T    R E P L I E S    (Newest First)
Rasmuss Posted - Apr 03 2008 : 03:30:53 AM
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.
feline Posted - Apr 02 2008 : 6:49:15 PM
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.

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