answersLogoWhite

0

It depends on the language.

In most cases a remark or comment is denoted by a token or symbol such that the remainder of that line is ignored by the language compiler or interpreter. That is, the comment extends to the end of the line it appears on (known as a single-line comment). However, some languages require that comments be placed on a separate line, by themselves, including BASIC which traditionally opens a comment with the keyword REM (short for remark).

In C, comments are enclosed in paired delimiters, beginning with /* and ending with */. This convention allows comments to extend across multiple lines as well as to insert comments inside code statements. Languages derived from C, including C++ and C#, also use this convention (known as a C-style comment), but they also allow single-line comments beginning with a // (double-slash) token. Java uses the same syntax as C++ and therefore uses the same comment style. Some languages use the # (pound) symbol to begin a comment while Visual Basic uses a ' (apostrophe).

Additional information on comments can be found in your language documentation.

User Avatar

Wiki User

9y ago

Still curious? Ask our experts.

Chat with our AI personalities

EzraEzra
Faith is not about having all the answers, but learning to ask the right questions.
Chat with Ezra
RossRoss
Every question is just a happy little opportunity.
Chat with Ross
CoachCoach
Success isn't just about winning—it's about vision, patience, and playing the long game.
Chat with Coach

Add your answer:

Earn +20 pts
Q: How do you add programme comments?
Write your answer...
Submit
Still have questions?
magnify glass
imp