Author |
Topic |
|
Perry
Junior Member
China
10 Posts |
Posted - Jul 10 2004 : 10:06:12 AM
|
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
|
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. |
|
|
Perry
Junior Member
China
10 Posts |
Posted - Jul 12 2004 : 09:53:48 AM
|
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*/)
|
-++?+?+?+?+?+?-? +?+?+?-?+?+++?+? ... |
|
|
rblondeau
Tomato Guru
Canada
102 Posts |
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - Jul 12 2004 : 12:43:47 PM
|
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 |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Jul 12 2004 : 1:40:30 PM
|
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. |
|
|
Perry
Junior Member
China
10 Posts |
Posted - Jul 13 2004 : 06:50:26 AM
|
Thanks |
-++?+?+?+?+?+?-? +?+?+?-?+?+++?+? ... |
|
|
|
Topic |
|