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
 VA parse bug in condition compile block
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jzq740176597
Tomato Guru

China
346 Posts

Posted - Nov 07 2012 :  7:08:55 PM  Show Profile  Reply with Quote
VA 1918 VS2008 SP1




The Enclose brace is wrongly match with the [If 's head brace](Is in condition block).
In VA outline,The other functions is cann't be recognized.

Creation come from persist!

feline
Whole Tomato Software

United Kingdom
19179 Posts

Posted - Nov 07 2012 :  7:34:37 PM  Show Profile  Reply with Quote
It looks like your function contains mismatched curly brackets. Since the #if 0 #endif block contains an opening curly bracket, and the highlighted "matching" curly bracket is outside the block, there must be mismatched brackets for this code to compile.

VA is designed to parse inside the #if 0 block, to help you when writing code here, so it is seeing these mismatched brackets and being confused by them. If you edit the code so that the brackets match up the problems should go away.

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

jzq740176597
Tomato Guru

China
346 Posts

Posted - Nov 08 2012 :  06:45:57 AM  Show Profile  Reply with Quote
Exactly!
By Delete the mismatched curly brackets,it's really can resolve the problem;
But I think The #if 0 #endif block is the code get off.It's should be uneffect the remaining valid code parse-process,is right?

Creation come from persist!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19179 Posts

Posted - Nov 08 2012 :  10:56:07 AM  Show Profile  Reply with Quote
Consider the code:

void simpleTestFunction()
{
#if OS_LINUX
    // inactive code under windows
    // VA is still active here
#endif
}

VA parses the code inside the #if #endif block, and helps you write code in there. This is by design. We are treating a #if 0 #endif block the same way.

If you really do not want the code inside the #if 0 #endif block at all you will delete it. Since it is still in the file, it must be there for a reason. You might simply be using #if 0 #endif as a debugging tool, to disable code while you work out what is causing a problem. In which case, having VA active and helpful inside this block is helping you. To be active we have to parse the code.

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

jzq740176597
Tomato Guru

China
346 Posts

Posted - Nov 08 2012 :  8:45:30 PM  Show Profile  Reply with Quote
Got it.Thanks.

Creation come from persist!
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