Beginner questions: How to comment blocks of code?

Is there any way to highlight blocks of code in the IDE and comment them out or uncomment them?



/* block to be commented out */ also

// comments out just the rest of the line

Note sure about highlighting


A possibly better approach to "commenting out" blocks of code is to use the #if approach. e.g.

#if 0
/* This comment won't cause problems */
Serial.print("And this code won't run.");

The main advantage of this approach is that you don't run into issues with multi-line comments.


Edit: Corrected typos. Thanks halley. :-)

follower, a common typo, I've done it too, but you mean #if 0 instead of #ifdef 0 - zero isn't a lexical identifier.