Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Paste with switch/case statements

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
lexxmt Posted - Jan 30 2006 : 05:05:51 AM
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




4   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Feb 01 2006 : 4:11:28 PM
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.
lexxmt Posted - Jan 31 2006 : 09:58:03 AM
Yes I have this option on. Look like this is IDE problem.
feline Posted - Jan 30 2006 : 3:29:27 PM
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.
lexxmt Posted - Jan 30 2006 : 05:18:52 AM
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.

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