What is comment? - Definition from WhatIs.com
Part of the Programming glossary:

Often cited as one of the most useful and least used programming conventions, a comment is a text note added to source code to provide explanatory information, usually about the function of the code. Comments are usually helpful to someone maintaining or enhancing your code when you are no longer around to answer questions about it. Peer developers sometimes assess code for the completeness and readability of its comments.

To enable the programming language compiler to recognize comments and not confuse them with instruction s, a special character is used (such as "#," " /* ," " ' " and " // ") to signal the beginning or the end of a comment. The HTML comment start characters ( <!-- ") tell the browser not to display the text between them and the end characters (" --> "); the text within these comment framing characters is visible, however, to anyone reading the code. Reading this page in a Web browser, for example, you can select "View" and then "Source" to see the HTML code for the page, including the comments.

A program should include at least: a file comment block that describes the contents of the file, so that someone reading the file can understand it without having to read the code itself, and a function comment block that describes each functional unit of code. In addition, some coders provide a comment for each language statement.

This was last updated in August 2005
Posted by: Margaret Rouse

Related Terms

Definitions

  • register (processor register, CPU register)

    - A processor register is one of a small set of data holding places that are part of a processor, or CPU, in a computer. (WhatIs.com)

  • compiler

    - A compiler is a special program that processes statements written in a particular programming language and turns them into machine language or "code" that a computer's processor uses. (WhatIs.com)

  • agile test automation pyramid

    - The agile test automation pyramid is a graphical strategy guide for implementing automated software testing. The model splits types of testing into three layers based on the return on investment (R... (searchITOperations.com)

Glossaries

  • Programming

    - Terms related to software programming, including definitions about programming languages and words and phrases about software design, coding, testing and debugging.

  • Internet applications

    - This WhatIs.com glossary contains terms related to Internet applications, including definitions about Software as a Service (SaaS) delivery models and words and phrases about web sites, e-commerce ...

Tech TalkComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.