+ 1
Use of \\ in comments causes Trouble?
I stumbled over this problem: As soon as I added \\ in a comment, I got a whole bunch of errors, while everything is fine without. See here: https://code.sololearn.com/c1p3B4k7Z83h/?ref=app Can anyone please explain this to me, I'm curious why this happens?
3 Respostas
+ 4
"If a line ends with a backslash, the following line is considered to be a continuation of that line. This is the standard behaviour."
From: stackoverflow.com/questions/28821786/double-backslash-in-comment-inside-array
+ 2
Yeah, it spawns a compiler warning: multi-line comment.
I get that it looks neat. You could stick (any char, but maybe) a semicolon out there to reduce (not remove) the confusion for programmers who follow you.
+ 1
Ah, I see, if I insert an empty line afterwards, everything is fine again.
Thanks for your answer!