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
 Paste with switch/case statements
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

lexxmt
Senior Member

Latvia
30 Posts

Posted - Jan 30 2006 :  05:05:51 AM  Show Profile  Reply with Quote
Formating after paste switch/case statements incorect

For example if I have code

BOOL APIENTRY DllMain(HANDLE hModule,DWORD ul_reason_for_call,LPVOID lpReserved){
switch(ul_reason_for_call){
case DLL_PROCESS_ATTACH:
if(g_bServerStarted){
}
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}


if I try insert same switch/case statement inside 'if' I got this bug




lexxmt
Senior Member

Latvia
30 Posts

Posted - Jan 30 2006 :  05:18:52 AM  Show Profile  Reply with Quote
I have VS2005Pro RTM + VX 1440

It better to turn off VX formating feature for switch/case statements, because on moving large switch case statements, code after VX reformating looks chaotically.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Jan 30 2006 :  3:29:27 PM  Show Profile  Reply with Quote
first question, do you have VA's "format after paste" turned on? i assume you do from what you are saying. if you select this code and tell the IDE to format it CTRL-K, CTRL-F what happens? an initial test here in VS2005 shows that the IDE its self is not formatting the switch statement as expected.

VA does not actually do any code formatting its self, instead it tells the IDE to format the code.

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

lexxmt
Senior Member

Latvia
30 Posts

Posted - Jan 31 2006 :  09:58:03 AM  Show Profile  Reply with Quote
Yes I have this option on. Look like this is IDE problem.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Feb 01 2006 :  4:11:28 PM  Show Profile  Reply with Quote
unfortunately the IDE does not give you many options to fine tune its formatting of the code *sigh*

it is worth knowing that if you highlight several lines at once and press tab all of the lines are indented by one tab stop. this should help you fix this formatting problem a little more easily.

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