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
 Feature Requests
 Comment Selection
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Perry
Junior Member

China
10 Posts

Posted - Jul 10 2004 :  10:06:12 AM  Show Profile
I found the Comment Selection Button useful VA10.0.1230.0 in VS6.0.
However, I think it is not as powerful as the one provided by VS.net. The VS .net Comment Button can comment part of a line with /* */ style comment. And when selection in VS 6 is part of a line especially in the middle of a line, the VA Comment Selection Button acts not so correct.

-++?+?+?+?+?+?-? +?+?+?-?+?+++?+? ...

support
Whole Tomato Software

5566 Posts

Posted - Jul 10 2004 :  11:23:09 AM  Show Profile
We find no problem with the "Surround with *" and "Surround with /" commands, at least not in build 1245.

We recommend you start by updating to the latest build.

http://www.wholetomato.com/downloads

"Surround with *" puts /* and */ around a selection that is just a partial line. ("Surround with /" does the same thing in this case.)

http://www.wholetomato.com/products/features/surround.html?more=yes

If you still have a problem with build 1245, please describe the steps to reproduce it. Tell us what happens and what you expect to happen.

Whole Tomato Software, Inc.
Go to Top of Page

Perry
Junior Member

China
10 Posts

Posted - Jul 12 2004 :  09:53:48 AM  Show Profile
Sorry. I didn't describe the problem clearly enough.

In the VS6 VA toolbar, there is a button named "Comment Selection", and the toolbar button imagine looks just like "//".
Suppose there is a line of code as follows:

int cxIcon = GetSystemMetrics(SM_CXICON);

and the selection is "cxIcon". After pressing the "Comment Selection" button, this line becomes as follows:

int // cxIcon = GetSystemMetrics(SM_CXICON);

And in VS .net, there is a toolbar button provided by the IDE which seems to have the same function as the "Comment Selection" button provided by VA in VS6. And after the similar operation in VS .net, the line becomes as follows:

int /*cxIcon*/ = GetSystemMetrics(SM_CXICON);

And I suppose the latter is better. If the whole line is selected in VS .net, a "//" style comment is added.

Further more, it seems that the VS .net comment button is more powerful. For example, if the code is:

int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);

and the selection is part of both lines:

GetSystemMetrics(SM_CXICON);
int

and the comment result is:

int cxIcon = /*GetSystemMetrics(SM_CXICON);
int*/ cyIcon = GetSystemMetrics(SM_CYICON);

If the selection already contains /**/ style comment, VS .net comment the whole with // style selection - If the code is:

SMandDlg::SMandDlg(CWnd* pParent /*=NULL*/)

and the selection is

(CWnd* pParent /*=NULL*/)

the comment result is

//SMandDlg::SMandDlg(CWnd* pParent /*=NULL*/)




-++?+?+?+?+?+?-? +?+?+?-?+?+++?+? ...
Go to Top of Page

rblondeau
Tomato Guru

Canada
102 Posts

Posted - Jul 12 2004 :  11:50:35 AM  Show Profile
Perry,

See the following thread for similar comments about commenting :

http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=2526
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Jul 12 2004 :  12:43:47 PM  Show Profile
quote:
Originally posted by Perry

Further more, it seems that the VS .net comment button is more powerful. For example, if the code is:

int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);

and the selection is part of both lines:

GetSystemMetrics(SM_CXICON);
int



testing here on VS .NET 2003 and VAX 1246 if i make a similar selection and press the / key (with surround selection turned on) then both lines are commented out with // style comments at the start of the lines.

there are times when i want to comment out a part of a line with /* */ comments, eg when commenting out default parameters in the cpp file. so some of the time what you are describing is what i want to happen.

personally i recommend using the * and / keys with surround selection, you get more control, and tend to get what you want more often.

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

support
Whole Tomato Software

5566 Posts

Posted - Jul 12 2004 :  1:40:30 PM  Show Profile
The "Comment Selection" icon in the VA X toolbar for VC++ 6.0 is quite old. The command was the first of many commenting commands, including those from MS. We should probably remove it from our default VC++ 6.0 toolbar since it has been supplanted by more superior versions.

We recommend the variants that feline suggests. Make a selection, either partial or whole line, and press * to surround with /*...*/, or / to prefix each line with //. (Requires enabling of an option in our options dialog.)

http://www.wholetomato.com/products/features/surround.html?more=yes

Since pressing / on selection of a partial line implies surrounding with /* and */, we prefer the / variant.

Whole Tomato Software, Inc.
Go to Top of Page

Perry
Junior Member

China
10 Posts

Posted - Jul 13 2004 :  06:50:26 AM  Show Profile
Thanks

-++?+?+?+?+?+?-? +?+?+?-?+?+++?+? ...
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000