| ??? 11/21/01 21:15 Read: times |
#16789 - RE: Keil\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
I presume you're talking about the back-slash as the "line continuation sign?"
I guess that it disappears here because this forum's HTML parsing sees it as some sort of escape? Anyway, why are you putting "line continuation signs" on the end of your single-line comments!? What do K&R have to say on the subject? (sorry, don't have my copy to hand at the moment) If the compiler (or rather, the preprocessor) sees a line ending with a backslash, it effectively removes the 'newline' and splices the original 2 lines into a single, long line. Therefore, if you put a backslash on the end of a single-line comment you are effectively extending the comment to include the following source line. It is not surprising that this could put the compiler out-of-step with the source code and give loads of errors & warnings! For example, consider the following:
for( blah; blah; blah ) // Comment
{
blah;
blah;
}
The backslash on the end of the Comment means that the opening brace gets "lost" within the "extended" comment and, therefore, the closing brace will cause an error!:
for( blah; blah; blah ) // Comment {
blah;
blah;
}
|
| Topic | Author | Date |
| Keil's 6.20c problem with comments | 01/01/70 00:00 | |
| RE: Keil\'s 6.20c problem with comments | 01/01/70 00:00 | |
| RE: Keil\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ | 01/01/70 00:00 | |
| RE: Keil\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ | 01/01/70 00:00 | |
| RE: Keil | 01/01/70 00:00 | |
| RE: Keil | 01/01/70 00:00 | |
| RE: Keil | 01/01/70 00:00 | |
| RE: Keil comments - correction | 01/01/70 00:00 | |
| RE: Keil, MSVC, BCB - consensus | 01/01/70 00:00 | |
| RE: Keil\'s 6.20c problem with comments | 01/01/70 00:00 | |
| RE: Keil\'s 6.20c comments - Craig | 01/01/70 00:00 | |
| RE: Keil, MSVC, BCB - consensus | 01/01/70 00:00 | |
| RE: Keil, MSVC, BCB - consensus | 01/01/70 00:00 | |
| RE: Keil\\\'s 6.20c problem with comments | 01/01/70 00:00 | |
| RE: Keil, MSVC, BCB - consensus | 01/01/70 00:00 | |
| RE: Keil, MSVC, BCB - consensus | 01/01/70 00:00 | |
| RE: Keil, MSVC, BCB - Peter | 01/01/70 00:00 | |
First things first! | 01/01/70 00:00 |



