+ 1

why there is no need for ; when you use comments?

1st Oct 2016, 6:43 AM
Alessandro Lazzarini
Alessandro Lazzarini - avatar
5 Réponses
+ 4
because compiler does not read comments...
1st Oct 2016, 6:57 AM
rahul negi
rahul negi - avatar
+ 4
Comments are the parts of the code which is ignored by the compiler. The " ; " is used to tell the compiler that the statement is closed. In The comments there is the closing by itself so you don't need to use " ; "..
1st Oct 2016, 6:58 AM
Sugam Adhikari
Sugam Adhikari - avatar
+ 2
ok thanks guys, just wanted a confirmation:)
1st Oct 2016, 6:59 AM
Alessandro Lazzarini
Alessandro Lazzarini - avatar
+ 1
because it is not a statement ...... therefore it not necessarily to terminate
1st Oct 2016, 8:01 AM
pawan sahani
pawan sahani - avatar
0
The programme ignores all the comments, so they're only used to inform someone, who is looking at the code about what it is supposed to do, or to write down other useful informations.
4th Oct 2016, 12:45 PM
Filip Brzezicki
Filip Brzezicki - avatar