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

  • Easter Egg

    - An Easter Egg is an unexpected surprise -- an undocumented procedure or unauthorized feature that's playful in nature or gives credit to the software developer or chip designer. (WhatIs.com)

  • NetBeans

    - NetBeans is a Java-based integrated development environment (IDE). The term also refers to the IDE’s underlying application platform framework.  (SearchSOA.com)

  • scraper site

    - A scraper site is a website that features content stolen from other sites and presented as original. Scraper sites copy valuable content from legitimate websites and republish it on their own sites. (WhatIs.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.