Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

gumball

easy newbie question

This topic is 6928 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
No.

If you do not use the C-Style block comments inside your code, than these will work nicely. Here''s an example in case you don''t know.

Change this:

////////////////
// MY COMMENT BLOCK
//
// DESC BLAH BLAH
// BLAH BLAH BLAH
// BLAH.
///////////////

To this:

/*
MY COMMENT BLOCK

DESC BLAH BLAH
BLAH BLAH BLAH
BLAH.
*/

if you DO use the block comment already and your trying to block out a section, there isn''t a one step solution. But there are some simply practices. The easiest is to simply have a tmep file open which is NOT added to the project, then cut and paste your offending code to the temp file, save it... and go on...when you want it back cut and paste it back into the original file...if it''s trash, delete it.

Share this post


Link to post
Share on other sites
Then there is


#ifdef 0

....stuff you don''t want compiled

#endif


Because there are not any nested code blocks.

Share this post


Link to post
Share on other sites
Thanks for those, but I was hoping there was a toolbar button that would allow you to select a block of code then click the button to automatically comment it.

This button exists in VB, I thought there may be one in VC++.

Does anyone have a macro to do this instead?

Anything that speeds the coding process is always good

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You cau use the CommentOut sample macro adding it as a button in a toolbar.
Open the Tools menu and select Customize.
Select "Add-ins and Macro files" tab and click on the check box to enable the Sample macros.
In the Command tab, select "All commands" in the category list and then search for the CommentOut command into the commands list.
Drag the CommentOut macro over a toolbar and drop it (you can specify either a icon and description).

Share this post


Link to post
Share on other sites
I posted on this a couple of weeks back. The CommentOut macro looks handy, but it has -never- worked for me. It keeps saying "cannot recognise the file type". Blah.

Edited by - Kylotan on 5/7/00 6:39:13 AM

Share this post


Link to post
Share on other sites
The CommentOut macro works for me.

I tried to create an UnComment macro by editing the CommentOut macro and changing:
ActiveDocument.Selection = "/*" + ActiveDocument.Selection + "*/"


to this:
ActiveDocument.Selection = Mid(ActiveDocument.Selection,3,Len(ActiveDocument.Selection - 2))

but it did not work.

Anyone got any ideas?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!