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
 Undesired code formatting
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Adequat
Tomato Guru

182 Posts

Posted - Jun 26 2014 :  09:50:27 AM  Show Profile  Reply with Quote
Les's say I have this code:


if (! x)
    Print();


Now I use the VA function to put braces around it. I obtain:


{
    if (!x)
	Print;
}


The problem:

if (! x)

was transformed to:

if (!x)


VA should not change the programmer's code formatting!
This is a recent bug, I used VA for long and only see this for a couple of weeks.




feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jun 26 2014 :  10:38:08 AM  Show Profile  Reply with Quote
Which IDE and version of VA are you using?

I cannot reproduce this in VA 2036 and VS2010, but I can reproduce it in VS2013. Since this is VS2013 specific for me, I don't think that this has anything to do with VA, at least not for me. VS2013 has added C++ formatting rules, and these rules are applied when code is edited or inserted, and the IDE will update the formatting of code VA touches. If this is what is happening to you, then you need to set the IDE C++ code formatting rules so they match the code formatting you are using.

Have a look at all of the settings under:

IDE tools menu -> Options -> Text Editor -> C/C++ -> Formatting

You probably want the Spacing rules.

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

Adequat
Tomato Guru

182 Posts

Posted - Jun 26 2014 :  4:26:39 PM  Show Profile  Reply with Quote
You are fully right. Thanks for the hint.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jun 26 2014 :  8:55:15 PM  Show Profile  Reply with Quote
You are not the only person to have reported odd formatting behaviour, VS2013 formatting options is turning out to be an occasional theme.

zen is the art of being at one with the two'ness
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