Question: Why doesn’t anyone use single-line comments?
the /* */ doesn’t nest.
Like:
//This is a one line Comment.
/* Commented_Out_Code();
/* this is a multi-line
Comment in Code */
This_Code_Still_Executes(); */
/* Commented_Out_Code();
// this is a multi-line
// comment in code
// split into single-line
// comments
This_Code_Dont_Execute(); // :ahh: */
The reason I say this is that you can use /* */ for commenting out and debugging.
The way I’ve always understood it was that /* */'s were the only way to use comments in C. When C++ came along, it added the // style comments. Therefore: //'s aren’t a part of standard C, only C++.
That probably explains why a lot of people don’t use them: they don’t expect them to work! However, you are correct in saying that the Microchip compiler does seem to allow them.
my standard practice is to make comments that actually say something single-liners “//”, and use “/* */” for commenting out blocks - that way there is no conflict.