Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Including */ in a C-style block comment

Is there any way to include */ in a C-style block comment? Changing the block comment to a series of line comments (//) is not an option in this case.

Here's an example of the sort of comment causing a problem:

/**
 * perl -pe 's/(?<=.{6}).*//g' : Limit to PID
 */
like image 808
Whatsit Avatar asked Nov 28 '22 00:11

Whatsit


2 Answers

Usually comments don't need to be literal, so this doesn't come up too often.

You can wrap it all in a #if block:

#if 0
whatever you want can go here, comments or not
#endif
like image 169
Mark Ransom Avatar answered Dec 10 '22 21:12

Mark Ransom


Nope! There isn't.

like image 38
mqp Avatar answered Dec 10 '22 19:12

mqp