Back

Comment

Idealogic’s Glossary

Comment – an extended form of description in the form of text describing what the code does, placed just below the commented code. The style of comments is dependent on the particular language being used. From the viewpoint of a compiler or interpreter, comments are the part of the source program text that does not alter the meaning of the program or its output.

According to most of the gurus’ opinions, comments should explain the purpose of the code rather than explaining the code itself. In comments, things that can be coded should not be repeated, because the aim of writing code is to make it as comprehensible as possible. Some people go to the extent of saying that if comments are needed for the comprehension of the program, then this is a sign that the code is substandard.

It is also used to comment out parts of the code for a while a certain part of the code is not needed. There are two types of comments: Both multi line comments (comment over several lines) and the single line comments (comment over the rest of the line).