Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 VA parse bug in condition compile block

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
jzq740176597 Posted - Nov 07 2012 : 7:08:55 PM
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.
4   L A T E S T    R E P L I E S    (Newest First)
jzq740176597 Posted - Nov 08 2012 : 8:45:30 PM
Got it.Thanks.
feline Posted - Nov 08 2012 : 10:56:07 AM
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.
jzq740176597 Posted - Nov 08 2012 : 06:45:57 AM
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?
feline Posted - Nov 07 2012 : 7:34:37 PM
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.

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