+ 2
How multi line comments differ from single line comments
Kindly don't add symbolic difference, explain the advantage.
6 Respuestas
+ 6
Multiline comments can be done as
// comment line 1
// comment line 2
// comment line 3
and they don't accidentally go too far.
/*
comment 1
x++;
/*
comment 2
*/
In this example, x doesn't get incremented. Given the number of times in Pascal code these bugs slipped in a huge project I worked on, I refuse to use them, unless I truly need an inline comment.
+ 8
Actually, there is one reason I used a multiline comment.
c = 3.14 /* pi */ * 2 * r;
It lets you sneak a comment within a code statement.
+ 7
It is easy to forget to close the multiline comment and end up having code you believe is executed not be. Otherwise, there isn't a difference.
+ 3
Multiline comments can be more than one line, single libe comments can be used in a single line before it starts a code again
+ 1
ok thank you.
0
Got it so it cleared the concept.