Thursday, September 06, 2007

Bored

I'm bored, so I'm going to bore you with some computer stuff...

When working in any programming language that supports C-style commenting (both /* */ and //), there is a simple way to have a large block of code that can easily be commented and uncommented. You start the comment block normally: /*, but you end the comment somewhat differently: //*/, with no code following on the line of the end-comment code. To un-comment the block of code, type another / before the opening /*, resulting in //*:

// Commented out:
/*
foo("bar");
...
//*/


// Not commented out:
//*

foo("bar");
...
//*/

Okay, back to work.