Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Hide code paths

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
Uniwares Posted - Jan 20 2020 : 10:54:17 AM
Crazy idea came to my mind now, something that might be tremendously useful though: hide code paths for a given set of variables.
WTF? yeah, let me show an example:


if(var1 == 0)
{
}
else
{
}

Now I can set "var1" to a value, like "0" and all code not executed with this value, is faded out, hidden, collapsed, whatever.

Dont tell me that this is a huge effort, I know that. Yet I wish I had that sometimes.
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jan 21 2020 : 11:20:35 AM
Um... over what sort of scale? Just one function, the entire solution, or something in between?

Short of actually compiling and executing the code, once the scale gets beyond "tiny" you are likely to get all sorts of edge cases and errors, suggesting that compiling and executing is the best and most reliable solution. This is before we get into the question of how to set the variable value to evaluate...

Interesting, but I am very wary of how wide ranging and complex this could quickly get.
Uniwares Posted - Jan 21 2020 : 05:28:40 AM
no no no, thats not what I am talking about. I dont want do modify the code. I want to assign a value to variables and the IDE evaluates code flow based on those values and fades out code that is not executed.
feline Posted - Jan 21 2020 : 04:53:02 AM
Are you aware that the IDE already does something like this, except that it only checks code disabled via the preprocessor, so #if and related blocks. Make sure you have turned On:

IDE tools menu -> Options -> Text Editor -> C/C++ -> View -> Show Inactive Blocks

and try the code:

if(var1 == 0)
{
}
#ifdef INACTIVE_CODE_CURRENTLY
else
{
}
#endif

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