If whitespace is ignored, why can comments be ended with a line break? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

If whitespace is ignored, why can comments be ended with a line break?

27th Aug 2017, 5:35 AM
Rachele Lee
Rachele Lee - avatar
3 Answers
+ 9
The compiler checks your code line by line. The comments are identified in the process and ignored. https://www.sololearn.com/Discuss/625801/?ref=app
27th Aug 2017, 5:49 AM
Hatsy Rei
Hatsy Rei - avatar
+ 7
all characters are ignored till the compiler finds the end comments character https://en.m.wikipedia.org/wiki/Comment_(computer_programming) Comment (computer programming) - Wikipedia https://www.quora.com/How-exactly-does-the-compiler-deal-with-comments-in-code-specifically How exactly does the compiler deal with comments in code - Quora
27th Aug 2017, 5:51 AM
Lord Krishna
Lord Krishna - avatar
+ 1
Thank you guys!
27th Aug 2017, 10:17 PM
Rachele Lee
Rachele Lee - avatar