CINXE.COM

Comment (computer programming) - Wikipedia

<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>Comment (computer programming) - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy", "wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"504d35c3-7b17-4bed-a110-4de98a863553","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Comment_(computer_programming)","wgTitle":"Comment (computer programming)","wgCurRevisionId":1258397066,"wgRevisionId":1258397066,"wgArticleId":8592308,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Articles with short description","Short description is different from Wikidata","Articles with example code","Articles with example C code","Articles with example Java code","Articles with example Perl code","Source code","Metadata"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Comment_(computer_programming)","wgRelevantArticleId":8592308,"wgIsProbablyEditable":true, "wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgRedirectedFrom":"REM_(DOS_command)","wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams":{"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":60000,"wgInternalRedirectTargetUrl":"/wiki/Comment_(computer_programming)","wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q1141067","wgCheckUserClientHintsHeadersJsApi":["brands","architecture", "bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","ext.pygments":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["mediawiki.action.view.redirect","ext.cite.ux-enhancements","ext.pygments.view","mediawiki.page.media","site","mediawiki.page.ready","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp", "ext.gadget.ReferenceTooltips","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.quicksurveys.init","ext.growthExperiments.SuggestedEditSession","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=ext.cite.styles%7Cext.pygments%2CwikimediaBadges%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&amp;only=styles&amp;skin=vector-2022"> <script async="" src="/w/load.php?lang=en&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=site.styles&amp;only=styles&amp;skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/CodeCmmt002.svg/1200px-CodeCmmt002.svg.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="1075"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/CodeCmmt002.svg/800px-CodeCmmt002.svg.png"> <meta property="og:image:width" content="800"> <meta property="og:image:height" content="717"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/CodeCmmt002.svg/640px-CodeCmmt002.svg.png"> <meta property="og:image:width" content="640"> <meta property="og:image:height" content="573"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Comment (computer programming) - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/Comment_(computer_programming)"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/Comment_(computer_programming)"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&amp;feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-Comment_computer_programming rootpage-Comment_computer_programming skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Wikipedia:Contents" title="Guides to browsing Wikipedia"><span>Contents</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Current_events" title="Articles related to current events"><span>Current events</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Visit a randomly selected article [x]" accesskey="x"><span>Random article</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:About" title="Learn about Wikipedia and how it works"><span>About Wikipedia</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia"><span>Contact us</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> Contribute </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia"><span>Help</span></a></li><li id="n-introduction" class="mw-list-item"><a href="/wiki/Help:Introduction" title="Learn how to edit Wikipedia"><span>Learn to edit</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Community_portal" title="The hub for editors"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes to Wikipedia [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_upload_wizard" title="Add images or other media for use on Wikipedia"><span>Upload file</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Main_Page" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="The Free Encyclopedia" src="/static/images/mobile/copyright/wikipedia-tagline-en.svg" width="117" height="13" style="width: 7.3125em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page&#039;s font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_en.wikipedia.org&amp;uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&amp;returnto=Comment+%28computer+programming%29" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&amp;returnto=Comment+%28computer+programming%29" title="You&#039;re encouraged to log in; however, it&#039;s not mandatory. [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Log in and more options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_en.wikipedia.org&amp;uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&amp;returnto=Comment+%28computer+programming%29" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&amp;returnto=Comment+%28computer+programming%29" title="You&#039;re encouraged to log in; however, it&#039;s not mandatory. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contents" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">(Top)</div> </a> </li> <li id="toc-Overview" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Overview"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Overview</span> </div> </a> <ul id="toc-Overview-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Uses" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Uses"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Uses</span> </div> </a> <button aria-controls="toc-Uses-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Uses subsection</span> </button> <ul id="toc-Uses-sublist" class="vector-toc-list"> <li id="toc-Planning_and_reviewing" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Planning_and_reviewing"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1</span> <span>Planning and reviewing</span> </div> </a> <ul id="toc-Planning_and_reviewing-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Code_description" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Code_description"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2</span> <span>Code description</span> </div> </a> <ul id="toc-Code_description-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Algorithmic_description" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Algorithmic_description"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3</span> <span>Algorithmic description</span> </div> </a> <ul id="toc-Algorithmic_description-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Resource_inclusion" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Resource_inclusion"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4</span> <span>Resource inclusion</span> </div> </a> <ul id="toc-Resource_inclusion-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Metadata" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Metadata"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5</span> <span>Metadata</span> </div> </a> <ul id="toc-Metadata-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Debugging" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Debugging"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.6</span> <span>Debugging</span> </div> </a> <ul id="toc-Debugging-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Automatic_documentation_generation" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Automatic_documentation_generation"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.7</span> <span>Automatic documentation generation</span> </div> </a> <ul id="toc-Automatic_documentation_generation-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Syntax_extension" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Syntax_extension"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.8</span> <span>Syntax extension</span> </div> </a> <ul id="toc-Syntax_extension-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Directive_uses" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Directive_uses"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.9</span> <span>Directive uses</span> </div> </a> <ul id="toc-Directive_uses-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Stress_relief" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Stress_relief"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.10</span> <span>Stress relief</span> </div> </a> <ul id="toc-Stress_relief-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Normative_views" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Normative_views"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Normative views</span> </div> </a> <button aria-controls="toc-Normative_views-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Normative views subsection</span> </button> <ul id="toc-Normative_views-sublist" class="vector-toc-list"> <li id="toc-Need_for_comments" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Need_for_comments"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.1</span> <span>Need for comments</span> </div> </a> <ul id="toc-Need_for_comments-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Level_of_detail" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Level_of_detail"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.2</span> <span>Level of detail</span> </div> </a> <ul id="toc-Level_of_detail-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Styles" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Styles"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Styles</span> </div> </a> <button aria-controls="toc-Styles-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Styles subsection</span> </button> <ul id="toc-Styles-sublist" class="vector-toc-list"> <li id="toc-Block_comment" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Block_comment"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.1</span> <span>Block comment</span> </div> </a> <ul id="toc-Block_comment-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Line_comments" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Line_comments"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.2</span> <span>Line comments</span> </div> </a> <ul id="toc-Line_comments-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Tags" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Tags"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Tags</span> </div> </a> <ul id="toc-Tags-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Examples" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Examples"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>Examples</span> </div> </a> <button aria-controls="toc-Examples-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Examples subsection</span> </button> <ul id="toc-Examples-sublist" class="vector-toc-list"> <li id="toc-Comparison" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Comparison"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1</span> <span>Comparison</span> </div> </a> <ul id="toc-Comparison-sublist" class="vector-toc-list"> <li id="toc-Ada" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Ada"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.1</span> <span>Ada</span> </div> </a> <ul id="toc-Ada-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-APL" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#APL"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.2</span> <span>APL</span> </div> </a> <ul id="toc-APL-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-AppleScript" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#AppleScript"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.3</span> <span>AppleScript</span> </div> </a> <ul id="toc-AppleScript-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-BASIC" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#BASIC"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.4</span> <span>BASIC</span> </div> </a> <ul id="toc-BASIC-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-C" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#C"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.5</span> <span>C</span> </div> </a> <ul id="toc-C-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Cisco_IOS_and_IOS-XE_configuration" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Cisco_IOS_and_IOS-XE_configuration"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.6</span> <span>Cisco IOS and IOS-XE configuration</span> </div> </a> <ul id="toc-Cisco_IOS_and_IOS-XE_configuration-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-ColdFusion" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#ColdFusion"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.7</span> <span>ColdFusion</span> </div> </a> <ul id="toc-ColdFusion-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-D" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#D"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.8</span> <span>D</span> </div> </a> <ul id="toc-D-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Fortran_IV" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Fortran_IV"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.9</span> <span>Fortran IV</span> </div> </a> <ul id="toc-Fortran_IV-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Fortran_90" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Fortran_90"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.10</span> <span>Fortran 90</span> </div> </a> <ul id="toc-Fortran_90-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Haskell" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Haskell"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.11</span> <span>Haskell</span> </div> </a> <ul id="toc-Haskell-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Java" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Java"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.12</span> <span>Java</span> </div> </a> <ul id="toc-Java-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-JavaScript" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#JavaScript"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.13</span> <span>JavaScript</span> </div> </a> <ul id="toc-JavaScript-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Lua" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Lua"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.14</span> <span>Lua</span> </div> </a> <ul id="toc-Lua-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-MATLAB" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#MATLAB"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.15</span> <span>MATLAB</span> </div> </a> <ul id="toc-MATLAB-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Nim" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Nim"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.16</span> <span>Nim</span> </div> </a> <ul id="toc-Nim-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-OCaml" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#OCaml"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.17</span> <span>OCaml</span> </div> </a> <ul id="toc-OCaml-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Pascal,_Delphi" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Pascal,_Delphi"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.18</span> <span>Pascal, Delphi</span> </div> </a> <ul id="toc-Pascal,_Delphi-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Perl" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Perl"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.19</span> <span>Perl</span> </div> </a> <ul id="toc-Perl-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-R" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#R"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.20</span> <span>R</span> </div> </a> <ul id="toc-R-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Raku" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Raku"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.21</span> <span>Raku</span> </div> </a> <ul id="toc-Raku-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-PHP" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#PHP"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.22</span> <span>PHP</span> </div> </a> <ul id="toc-PHP-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-PowerShell" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#PowerShell"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.23</span> <span>PowerShell</span> </div> </a> <ul id="toc-PowerShell-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Python" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Python"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.24</span> <span>Python</span> </div> </a> <ul id="toc-Python-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Ruby" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Ruby"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.25</span> <span>Ruby</span> </div> </a> <ul id="toc-Ruby-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-SQL" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#SQL"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.26</span> <span>SQL</span> </div> </a> <ul id="toc-SQL-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Swift" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Swift"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.27</span> <span>Swift</span> </div> </a> <ul id="toc-Swift-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-XML_(or_HTML)" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#XML_(or_HTML)"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1.28</span> <span>XML (or HTML)</span> </div> </a> <ul id="toc-XML_(or_HTML)-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> </ul> </li> <li id="toc-Security_issues" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Security_issues"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>Security issues</span> </div> </a> <ul id="toc-Security_issues-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-See_also" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#See_also"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>See also</span> </div> </a> <ul id="toc-See_also-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Notes_and_references" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Notes_and_references"> <div class="vector-toc-text"> <span class="vector-toc-numb">9</span> <span>Notes and references</span> </div> </a> <ul id="toc-Notes_and_references-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Further_reading" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Further_reading"> <div class="vector-toc-text"> <span class="vector-toc-numb">10</span> <span>Further reading</span> </div> </a> <ul id="toc-Further_reading-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-External_links" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#External_links"> <div class="vector-toc-text"> <span class="vector-toc-numb">11</span> <span>External links</span> </div> </a> <ul id="toc-External_links-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Comment (computer programming)</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Go to an article in another language. Available in 28 languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-28" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">28 languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D8%AA%D8%B9%D9%84%D9%8A%D9%82_(%D8%A8%D8%B1%D9%85%D8%AC%D8%A9)" title="تعليق (برمجة) – Arabic" lang="ar" hreflang="ar" data-title="تعليق (برمجة)" data-language-autonym="العربية" data-language-local-name="Arabic" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-az mw-list-item"><a href="https://az.wikipedia.org/wiki/%C5%9E%C9%99rh_(proqramla%C5%9Fd%C4%B1rma)" title="Şərh (proqramlaşdırma) – Azerbaijani" lang="az" hreflang="az" data-title="Şərh (proqramlaşdırma)" data-language-autonym="Azərbaycanca" data-language-local-name="Azerbaijani" class="interlanguage-link-target"><span>Azərbaycanca</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/Koment%C3%A1%C5%99_(programov%C3%A1n%C3%AD)" title="Komentář (programování) – Czech" lang="cs" hreflang="cs" data-title="Komentář (programování)" data-language-autonym="Čeština" data-language-local-name="Czech" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-da mw-list-item"><a href="https://da.wikipedia.org/wiki/Kommentar_(datalogi)" title="Kommentar (datalogi) – Danish" lang="da" hreflang="da" data-title="Kommentar (datalogi)" data-language-autonym="Dansk" data-language-local-name="Danish" class="interlanguage-link-target"><span>Dansk</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Kommentar_(Programmierung)" title="Kommentar (Programmierung) – German" lang="de" hreflang="de" data-title="Kommentar (Programmierung)" data-language-autonym="Deutsch" data-language-local-name="German" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-et mw-list-item"><a href="https://et.wikipedia.org/wiki/Kommentaar_(programmeerimine)" title="Kommentaar (programmeerimine) – Estonian" lang="et" hreflang="et" data-title="Kommentaar (programmeerimine)" data-language-autonym="Eesti" data-language-local-name="Estonian" class="interlanguage-link-target"><span>Eesti</span></a></li><li class="interlanguage-link interwiki-el mw-list-item"><a href="https://el.wikipedia.org/wiki/%CE%A3%CF%87%CF%8C%CE%BB%CE%B9%CE%BF_(%CF%80%CF%81%CE%BF%CE%B3%CF%81%CE%B1%CE%BC%CE%BC%CE%B1%CF%84%CE%B9%CF%83%CE%BC%CF%8C%CF%82)" title="Σχόλιο (προγραμματισμός) – Greek" lang="el" hreflang="el" data-title="Σχόλιο (προγραμματισμός)" data-language-autonym="Ελληνικά" data-language-local-name="Greek" class="interlanguage-link-target"><span>Ελληνικά</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/Comentario_(inform%C3%A1tica)" title="Comentario (informática) – Spanish" lang="es" hreflang="es" data-title="Comentario (informática)" data-language-autonym="Español" data-language-local-name="Spanish" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-eo mw-list-item"><a href="https://eo.wikipedia.org/wiki/Kodkomento" title="Kodkomento – Esperanto" lang="eo" hreflang="eo" data-title="Kodkomento" data-language-autonym="Esperanto" data-language-local-name="Esperanto" class="interlanguage-link-target"><span>Esperanto</span></a></li><li class="interlanguage-link interwiki-eu mw-list-item"><a href="https://eu.wikipedia.org/wiki/Ohar_(programazioa)" title="Ohar (programazioa) – Basque" lang="eu" hreflang="eu" data-title="Ohar (programazioa)" data-language-autonym="Euskara" data-language-local-name="Basque" class="interlanguage-link-target"><span>Euskara</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D8%AA%D9%88%D8%B6%DB%8C%D8%AD_(%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87%E2%80%8C%D9%86%D9%88%DB%8C%D8%B3%DB%8C_%D8%B1%D8%A7%DB%8C%D8%A7%D9%86%D9%87%E2%80%8C%D8%A7%DB%8C)" title="توضیح (برنامه‌نویسی رایانه‌ای) – Persian" lang="fa" hreflang="fa" data-title="توضیح (برنامه‌نویسی رایانه‌ای)" data-language-autonym="فارسی" data-language-local-name="Persian" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/Commentaire_(informatique)" title="Commentaire (informatique) – French" lang="fr" hreflang="fr" data-title="Commentaire (informatique)" data-language-autonym="Français" data-language-local-name="French" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%EC%A3%BC%EC%84%9D_(%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D)" title="주석 (프로그래밍) – Korean" lang="ko" hreflang="ko" data-title="주석 (프로그래밍)" data-language-autonym="한국어" data-language-local-name="Korean" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/Commento_(informatica)" title="Commento (informatica) – Italian" lang="it" hreflang="it" data-title="Commento (informatica)" data-language-autonym="Italiano" data-language-local-name="Italian" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-kk mw-list-item"><a href="https://kk.wikipedia.org/wiki/%D0%A2%D2%AF%D1%81%D1%96%D0%BD%D1%96%D0%BA%D1%82%D0%B5%D0%BC%D0%B5_(%D0%B1%D0%B0%D2%93%D0%B4%D0%B0%D1%80%D0%BB%D0%B0%D0%BC%D0%B0%D0%BB%D0%B0%D1%83)" title="Түсініктеме (бағдарламалау) – Kazakh" lang="kk" hreflang="kk" data-title="Түсініктеме (бағдарламалау)" data-language-autonym="Қазақша" data-language-local-name="Kazakh" class="interlanguage-link-target"><span>Қазақша</span></a></li><li class="interlanguage-link interwiki-nl mw-list-item"><a href="https://nl.wikipedia.org/wiki/Commentaar_(programmeren)" title="Commentaar (programmeren) – Dutch" lang="nl" hreflang="nl" data-title="Commentaar (programmeren)" data-language-autonym="Nederlands" data-language-local-name="Dutch" class="interlanguage-link-target"><span>Nederlands</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/%E3%82%B3%E3%83%A1%E3%83%B3%E3%83%88_(%E3%82%B3%E3%83%B3%E3%83%94%E3%83%A5%E3%83%BC%E3%82%BF)" title="コメント (コンピュータ) – Japanese" lang="ja" hreflang="ja" data-title="コメント (コンピュータ)" data-language-autonym="日本語" data-language-local-name="Japanese" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-mhr mw-list-item"><a href="https://mhr.wikipedia.org/wiki/%D0%9E%D0%B9%D0%BF%D0%B5%D0%BB%D0%B5%D1%88%D1%82%D1%8B%D1%88" title="Ойпелештыш – Eastern Mari" lang="mhr" hreflang="mhr" data-title="Ойпелештыш" data-language-autonym="Олык марий" data-language-local-name="Eastern Mari" class="interlanguage-link-target"><span>Олык марий</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/Komentarz_(informatyka)" title="Komentarz (informatyka) – Polish" lang="pl" hreflang="pl" data-title="Komentarz (informatyka)" data-language-autonym="Polski" data-language-local-name="Polish" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%9A%D0%BE%D0%BC%D0%BC%D0%B5%D0%BD%D1%82%D0%B0%D1%80%D0%B8%D0%B8_(%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5)" title="Комментарии (программирование) – Russian" lang="ru" hreflang="ru" data-title="Комментарии (программирование)" data-language-autonym="Русский" data-language-local-name="Russian" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-ckb mw-list-item"><a href="https://ckb.wikipedia.org/wiki/%D9%84%DB%8E%D8%AF%D9%88%D8%A7%D9%86_(%D8%A8%DB%95%D8%B1%D9%86%D8%A7%D9%85%DB%95%D8%B3%D8%A7%D8%B2%DB%8C)" title="لێدوان (بەرنامەسازی) – Central Kurdish" lang="ckb" hreflang="ckb" data-title="لێدوان (بەرنامەسازی)" data-language-autonym="کوردی" data-language-local-name="Central Kurdish" class="interlanguage-link-target"><span>کوردی</span></a></li><li class="interlanguage-link interwiki-sv mw-list-item"><a href="https://sv.wikipedia.org/wiki/Kodkommentar" title="Kodkommentar – Swedish" lang="sv" hreflang="sv" data-title="Kodkommentar" data-language-autonym="Svenska" data-language-local-name="Swedish" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-ta mw-list-item"><a href="https://ta.wikipedia.org/wiki/%E0%AE%95%E0%AF%81%E0%AE%B1%E0%AE%BF%E0%AE%AA%E0%AF%8D%E0%AE%AA%E0%AF%81%E0%AE%B0%E0%AF%88_(%E0%AE%A8%E0%AE%BF%E0%AE%B0%E0%AE%B2%E0%AE%BE%E0%AE%95%E0%AF%8D%E0%AE%95%E0%AE%AE%E0%AF%8D)" title="குறிப்புரை (நிரலாக்கம்) – Tamil" lang="ta" hreflang="ta" data-title="குறிப்புரை (நிரலாக்கம்)" data-language-autonym="தமிழ்" data-language-local-name="Tamil" class="interlanguage-link-target"><span>தமிழ்</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/Yorum_sat%C4%B1r%C4%B1" title="Yorum satırı – Turkish" lang="tr" hreflang="tr" data-title="Yorum satırı" data-language-autonym="Türkçe" data-language-local-name="Turkish" class="interlanguage-link-target"><span>Türkçe</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/%D0%9A%D0%BE%D0%BC%D0%B5%D0%BD%D1%82%D0%B0%D1%80_(%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D1%83%D0%B2%D0%B0%D0%BD%D0%BD%D1%8F)" title="Коментар (програмування) – Ukrainian" lang="uk" hreflang="uk" data-title="Коментар (програмування)" data-language-autonym="Українська" data-language-local-name="Ukrainian" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/Comment_(l%E1%BA%ADp_tr%C3%ACnh_m%C3%A1y_t%C3%ADnh)" title="Comment (lập trình máy tính) – Vietnamese" lang="vi" hreflang="vi" data-title="Comment (lập trình máy tính)" data-language-autonym="Tiếng Việt" data-language-local-name="Vietnamese" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-zh-yue mw-list-item"><a href="https://zh-yue.wikipedia.org/wiki/%E7%A8%8B%E5%BC%8F%E6%B3%A8%E9%87%8B" title="程式注釋 – Cantonese" lang="yue" hreflang="yue" data-title="程式注釋" data-language-autonym="粵語" data-language-local-name="Cantonese" class="interlanguage-link-target"><span>粵語</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/%E8%A8%BB%E8%A7%A3_(%E7%A8%8B%E5%BC%8F%E8%A8%AD%E8%A8%88)" title="註解 (程式設計) – Chinese" lang="zh" hreflang="zh" data-title="註解 (程式設計)" data-language-autonym="中文" data-language-local-name="Chinese" class="interlanguage-link-target"><span>中文</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q1141067#sitelinks-wikipedia" title="Edit interlanguage links" class="wbc-editpage">Edit links</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Comment_(computer_programming)" title="View the content page [c]" accesskey="c"><span>Article</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Talk:Comment_(computer_programming)" rel="discussion" title="Discuss improvements to the content page [t]" accesskey="t"><span>Talk</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Comment_(computer_programming)"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Comment_(computer_programming)"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/Comment_(computer_programming)" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/Comment_(computer_programming)" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Comment_(computer_programming)&amp;oldid=1258397066" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:CiteThisPage&amp;page=Comment_%28computer_programming%29&amp;id=1258397066&amp;wpFormIdentifier=titleform" title="Information on how to cite this page"><span>Cite this page</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FComment_%28computer_programming%29"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FComment_%28computer_programming%29"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&amp;page=Comment_%28computer_programming%29&amp;action=show-download-screen" title="Download this page as a PDF file"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=Comment_(computer_programming)&amp;printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q1141067" title="Structured data on this page hosted by Wikidata [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">From Wikipedia, the free encyclopedia</div> </div> <div id="contentSub"><div id="mw-content-subtitle"><span class="mw-redirectedfrom">(Redirected from <a href="/w/index.php?title=REM_(DOS_command)&amp;redirect=no" class="mw-redirect" title="REM (DOS command)">REM (DOS command)</a>)</span></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">Explanatory note in the source code of a computer program</div> <style data-mw-deduplicate="TemplateStyles:r1236090951">.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}</style><div role="note" class="hatnote navigation-not-searchable selfref">For comments in Wikipedia markup, see <a href="/wiki/Help:Wiki_markup#Character_formatting" class="mw-redirect" title="Help:Wiki markup">Help:Wiki markup §&#160;Character formatting</a>, and <a href="/wiki/Wikipedia:COMMENT" class="mw-redirect" title="Wikipedia:COMMENT">WP:COMMENT</a>.</div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable selfref">"/*" and "*/" redirect here. For their use in Wikipedia edit summaries, see <a href="/wiki/Help:Edit_summary#Section_editing" title="Help:Edit summary">Help:Edit summary §&#160;Section editing</a>.</div> <figure class="mw-halign-right" typeof="mw:File/Thumb"><a href="/wiki/File:CodeCmmt002.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/7/75/CodeCmmt002.svg/300px-CodeCmmt002.svg.png" decoding="async" width="300" height="269" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/7/75/CodeCmmt002.svg/450px-CodeCmmt002.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/7/75/CodeCmmt002.svg/600px-CodeCmmt002.svg.png 2x" data-file-width="356" data-file-height="319" /></a><figcaption>An illustration of <a href="/wiki/Java_(programming_language)" title="Java (programming language)">Java</a> source code with <b>prologue</b> comments indicated in <span style="color:#f00;">red</span> and <b>inline</b> comments in <span style="color:#0e850e;">green</span>. <b>Program code</b> is in <span style="color:#00f;"> blue</span>.</figcaption></figure> <p>In <a href="/wiki/Computer_programming" title="Computer programming">computer programming</a>, a <b>comment</b> is a <a href="/wiki/Human-readable" class="mw-redirect" title="Human-readable">human-readable</a> explanation or <i><a href="/wiki/Annotation" title="Annotation">annotation</a></i> in the <a href="/wiki/Source_code" title="Source code">source code</a> of a <a href="/wiki/Computer_program" title="Computer program">computer program</a>. They are added with the purpose of making the source code easier for humans to understand, and are generally ignored by <a href="/wiki/Compiler" title="Compiler">compilers</a> and <a href="/wiki/Interpreter_(computing)" title="Interpreter (computing)">interpreters</a>.<sup id="cite_ref-PennyGrubb000_1-0" class="reference"><a href="#cite_note-PennyGrubb000-1"><span class="cite-bracket">&#91;</span>1<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">&#91;</span>2<span class="cite-bracket">&#93;</span></a></sup> The <a href="/wiki/Comparison_of_programming_languages_(syntax)#Comments" title="Comparison of programming languages (syntax)">syntax of comments</a> in various programming languages varies considerably. </p><p>Comments are sometimes also processed in various ways to generate documentation external to the source code itself by <a href="/wiki/Documentation_generator" title="Documentation generator">documentation generators</a>, or used for integration with <a href="/wiki/Version_control" title="Version control">source code management</a> systems and other kinds of external <a href="/wiki/Programming_tool" title="Programming tool">programming tools</a>. </p><p>The flexibility provided by comments allows for a wide degree of variability, but formal conventions for their use are commonly part of <a href="/wiki/Programming_style" title="Programming style">programming style</a> guides. </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="Overview">Overview</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=1" title="Edit section: Overview"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Comments are generally formatted as either <i>block comments</i> (also called <i>prologue comments</i> or <i>stream comments</i>) or <i>line comments</i> (also called <i>inline comments</i>).<sup id="cite_ref-JBDixit000_3-0" class="reference"><a href="#cite_note-JBDixit000-3"><span class="cite-bracket">&#91;</span>3<span class="cite-bracket">&#93;</span></a></sup> </p><p>Block comments <a href="/wiki/Delimiter#Bracket_delimiters" title="Delimiter">delimit</a> a region of source code which may span multiple lines or a part of a single line. This region is specified with a <i>start</i> delimiter and an <i>end</i> delimiter. Some programming languages (such as <a href="/wiki/MATLAB" title="MATLAB">MATLAB</a>) allow block comments to be recursively nested inside one another, but others (such as <a href="/wiki/Java_(programming_language)" title="Java (programming language)">Java</a>) do not.<sup id="cite_ref-Higham000_4-0" class="reference"><a href="#cite_note-Higham000-4"><span class="cite-bracket">&#91;</span>4<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-Vermeulen000_5-0" class="reference"><a href="#cite_note-Vermeulen000-5"><span class="cite-bracket">&#91;</span>5<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-javadude000_6-0" class="reference"><a href="#cite_note-javadude000-6"><span class="cite-bracket">&#91;</span>6<span class="cite-bracket">&#93;</span></a></sup> </p><p>Line comments either start with a comment delimiter and continue until the end of the line, or in some cases, start at a specific column (character line offset) in the source code, and continue until the end of the line.<sup id="cite_ref-javadude000_6-1" class="reference"><a href="#cite_note-javadude000-6"><span class="cite-bracket">&#91;</span>6<span class="cite-bracket">&#93;</span></a></sup> </p><p>Some programming languages employ both block and line comments with different comment delimiters. For example, <a href="/wiki/C%2B%2B" title="C++">C++</a> has block comments delimited by <code>/*</code> and <code>*/</code> that can span multiple lines and line comments delimited by <code>//</code>. Other languages support only one type of comment. For example, <a href="/wiki/Ada_(programming_language)" title="Ada (programming language)">Ada</a> comments are line comments: they start with <code>--</code> and continue to the end of the line.<sup id="cite_ref-javadude000_6-2" class="reference"><a href="#cite_note-javadude000-6"><span class="cite-bracket">&#91;</span>6<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="Uses">Uses</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=2" title="Edit section: Uses"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>How best to make use of comments is subject to dispute; different commentators have offered varied and sometimes opposing viewpoints.<sup id="cite_ref-Dietrich000_7-0" class="reference"><a href="#cite_note-Dietrich000-7"><span class="cite-bracket">&#91;</span>7<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-Keyes000_8-0" class="reference"><a href="#cite_note-Keyes000-8"><span class="cite-bracket">&#91;</span>8<span class="cite-bracket">&#93;</span></a></sup> There are many different ways of writing comments and many commentators offer conflicting advice.<sup id="cite_ref-Keyes000_8-1" class="reference"><a href="#cite_note-Keyes000-8"><span class="cite-bracket">&#91;</span>8<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Planning_and_reviewing">Planning and reviewing</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=3" title="Edit section: Planning and reviewing"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Comments can be used as a form of <a href="/wiki/Pseudocode" title="Pseudocode">pseudocode</a> to outline intention prior to writing the actual code. In this case it should explain the logic behind the code rather than the code itself. </p> <div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span></span><span class="cm">/* loop backwards through all elements returned by the server </span> <span class="cm">(they should be processed chronologically)*/</span> <span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">numElementsReturned</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&gt;=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">--</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="cm">/* process each element&#39;s data */</span> <span class="w"> </span><span class="n">updatePattern</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="n">returnedElements</span><span class="p">[</span><span class="n">i</span><span class="p">]);</span> <span class="p">}</span> </pre></div> <p>If this type of comment is left in, it simplifies the review process by allowing a direct comparison of the code with the intended results. A common logical fallacy is that code that is easy to understand does what it's <i>supposed</i> to do. </p> <div class="mw-heading mw-heading3"><h3 id="Code_description">Code description</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=4" title="Edit section: Code description"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Comments can be used to summarize code or to explain the programmer's intent. According to this school of thought, restating the code in plain English is considered superfluous; the need to re-explain code may be a sign that it is too complex and should be rewritten, or that the naming is bad. </p> <dl><dd>"Don't document bad code – rewrite it."<sup id="cite_ref-BadComment000_9-0" class="reference"><a href="#cite_note-BadComment000-9"><span class="cite-bracket">&#91;</span>9<span class="cite-bracket">&#93;</span></a></sup></dd></dl> <dl><dd>"Good comments don't repeat the code or explain it. They clarify its intent. Comments should explain, at a higher level of abstraction than the code, what you're trying to do."<sup id="cite_ref-GoodComment000_10-0" class="reference"><a href="#cite_note-GoodComment000-10"><span class="cite-bracket">&#91;</span>10<span class="cite-bracket">&#93;</span></a></sup></dd></dl> <p>Comments may also be used to explain why a block of code does not seem to fit conventions or best practices. This is especially true of projects involving very little development time, or in bug fixing. For example: </p> <div class="mw-highlight mw-highlight-lang-vbscript mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">&#39; Second variable dim because of server errors produced when reuse form data. No</span> <span class="c1">&#39; documentation available on server behavior issue, so just coding around it.</span> <span class="n">vtx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">server</span><span class="p">.</span><span class="n">mappath</span><span class="p">(</span><span class="s2">&quot;local settings&quot;</span><span class="p">)</span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Algorithmic_description">Algorithmic description</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=5" title="Edit section: Algorithmic description"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Sometimes source code contains a novel or noteworthy solution to a specific problem. In such cases, comments may contain an explanation of the methodology. Such explanations may include diagrams and formal mathematical proofs. This may constitute explanation of the code, rather than a clarification of its intent; but others tasked with maintaining the code base may find such explanation crucial. This might especially be true in the case of highly specialized problem domains; or rarely used optimizations, constructs or function-calls.<sup id="cite_ref-AlgoComments_11-0" class="reference"><a href="#cite_note-AlgoComments-11"><span class="cite-bracket">&#91;</span>11<span class="cite-bracket">&#93;</span></a></sup> </p><p>For example, a programmer may add a comment to explain why an <a href="/wiki/Insertion_sort" title="Insertion sort">insertion sort</a> was chosen instead of a <a href="/wiki/Quicksort" title="Quicksort">quicksort</a>, as the former is, in theory, slower than the latter. This could be written as follows: </p> <div class="mw-highlight mw-highlight-lang-java mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">[</span><span class="n">f</span><span class="w"> </span><span class="p">(</span><span class="n">b</span><span class="p">),</span><span class="w"> </span><span class="n">f</span><span class="w"> </span><span class="p">(</span><span class="n">b</span><span class="p">),</span><span class="w"> </span><span class="n">f</span><span class="w"> </span><span class="p">(</span><span class="n">c</span><span class="p">),</span><span class="w"> </span><span class="n">f</span><span class="w"> </span><span class="p">(</span><span class="n">d</span><span class="p">),</span><span class="w"> </span><span class="n">f</span><span class="w"> </span><span class="p">(</span><span class="n">a</span><span class="p">),</span><span class="w"> </span><span class="p">...</span><span class="o">]</span><span class="p">;</span> <span class="w"> </span><span class="c1">// Need a stable sort. Besides, the performance really does not matter.</span> <span class="w"> </span><span class="n">insertion_sort</span><span class="w"> </span><span class="p">(</span><span class="n">list</span><span class="p">);</span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Resource_inclusion">Resource inclusion</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=6" title="Edit section: Resource inclusion"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Logo" title="Logo">Logos</a>, diagrams, and <a href="/wiki/Flowchart" title="Flowchart">flowcharts</a> consisting of <a href="/wiki/ASCII_art" title="ASCII art">ASCII art</a> constructions can be inserted into source code formatted as a comment.<sup id="cite_ref-asciiart000_12-0" class="reference"><a href="#cite_note-asciiart000-12"><span class="cite-bracket">&#91;</span>12<span class="cite-bracket">&#93;</span></a></sup> Further, <a href="/wiki/Copyright" title="Copyright">copyright</a> notices can be embedded within source code as comments. Binary data may also be encoded in comments through a process known as <a href="/wiki/Binary-to-text_encoding" title="Binary-to-text encoding">binary-to-text encoding</a>, although such practice is uncommon and typically relegated to external resource files. </p><p>The following code fragment is a simple ASCII diagram depicting the process flow for a <a href="/wiki/System_administration" class="mw-redirect" title="System administration">system administration</a> script contained in a <a href="/wiki/Windows_Script_File" title="Windows Script File">Windows Script File</a> running under <a href="/wiki/Windows_Script_Host" title="Windows Script Host">Windows Script Host</a>. Although a section marking the code appears as a comment, the diagram itself actually appears in an <a href="/wiki/XML" title="XML">XML</a> <a href="/wiki/CDATA" title="CDATA">CDATA</a> section, which is technically considered distinct from comments, but can serve similar purposes.<sup id="cite_ref-Niederst000_13-0" class="reference"><a href="#cite_note-Niederst000-13"><span class="cite-bracket">&#91;</span>13<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="cm">&lt;!-- begin: wsf_resource_nodes --&gt;</span> <span class="nt">&lt;resource</span><span class="w"> </span><span class="na">id=</span><span class="s">&quot;ProcessDiagram000&quot;</span><span class="nt">&gt;</span> <span class="cp">&lt;![CDATA[</span> <span class="cp"> HostApp (Main_process)</span> <span class="cp"> |</span> <span class="cp"> V</span> <span class="cp">script.wsf (app_cmd) --&gt; ClientApp (async_run, batch_process)</span> <span class="cp"> |</span> <span class="cp"> |</span> <span class="cp"> V</span> <span class="cp"> mru.ini (mru_history) </span> <span class="cp">]]&gt;</span> <span class="nt">&lt;/resource&gt;</span> </pre></div> <p>Although this identical diagram could easily have been included as a comment, the example illustrates one instance where a programmer may opt not to use comments as a way of including resources in source code.<sup id="cite_ref-Niederst000_13-1" class="reference"><a href="#cite_note-Niederst000-13"><span class="cite-bracket">&#91;</span>13<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Metadata">Metadata</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=7" title="Edit section: Metadata"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Metadata" title="Metadata">Metadata</a></div> <p>Comments in a computer program often store metadata about a program file. </p><p>In particular, many <a href="/wiki/Software_maintainer" title="Software maintainer">software maintainers</a> put submission guidelines in comments to help people who read the source code of that program to send any improvements they make back to the maintainer. </p><p>Other metadata includes: the name of the creator of the original version of the program file and the date when the first version was created, the name of the current maintainer of the program, the names of other people who have edited the program file so far, the URL of documentation about how to use the program, the name of the <a href="/wiki/Software_license" title="Software license">software license</a> for this program file, etc. </p><p>When an algorithm in some section of the program is based on a description in a book or other reference, comments can be used to give the page number and title of the book or <a href="/wiki/Request_for_Comments" title="Request for Comments">Request for Comments</a> or other reference. </p><p><span class="anchor" id="Comment_out"></span> </p> <div class="mw-heading mw-heading3"><h3 id="Debugging">Debugging</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=8" title="Edit section: Debugging"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A common developer practice is to <i>comment out</i> a code snippet, meaning to add comment syntax causing that block of code to become a comment, so that it will not be executed in the final program. This may be done to exclude certain pieces of code from the final program, or (more commonly) it can be used to find the source of an error. By systematically commenting out and running parts of the program, the source of an error can be determined, allowing it to be corrected. </p><p>Many IDEs allow quick adding or removing such comments with single menu options or key combinations. The programmer has only to mark the part of text they want to (un)comment and choose the appropriate option. </p> <div class="mw-heading mw-heading3"><h3 id="Automatic_documentation_generation">Automatic documentation generation</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=9" title="Edit section: Automatic documentation generation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Documentation_generator" title="Documentation generator">Documentation generator</a></div> <p><a href="/wiki/Programming_tool" title="Programming tool">Programming tools</a> sometimes store documentation and <a href="/wiki/Metadata" title="Metadata">metadata</a> in comments.<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">&#91;</span>14<span class="cite-bracket">&#93;</span></a></sup> These may include insert positions for automatic header file inclusion, commands to set the file's <a href="/wiki/Syntax_highlighting" title="Syntax highlighting">syntax highlighting</a> mode,<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">&#91;</span>15<span class="cite-bracket">&#93;</span></a></sup> or the file's <a href="/wiki/Revision_control" class="mw-redirect" title="Revision control">revision number</a>.<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">&#91;</span>16<span class="cite-bracket">&#93;</span></a></sup> These functional control comments are also commonly referred to as <a href="/wiki/Annotation" title="Annotation">annotations</a>. Keeping documentation within source code comments is considered as one way to simplify the documentation process, as well as increase the chances that the documentation will be kept up to date with changes in the code.<sup id="cite_ref-Ambler000_17-0" class="reference"><a href="#cite_note-Ambler000-17"><span class="cite-bracket">&#91;</span>17<span class="cite-bracket">&#93;</span></a></sup> </p><p>Examples of documentation generators include the programs <a href="/wiki/Javadoc" title="Javadoc">Javadoc</a> for use with <a href="/wiki/Java_(programming_language)" title="Java (programming language)">Java</a>, <a href="/wiki/Ddoc" title="Ddoc">Ddoc</a> for <a href="/wiki/D_(programming_language)" title="D (programming language)">D</a>, <a href="/wiki/Doxygen" title="Doxygen">Doxygen</a> for <a href="/wiki/C_(programming_language)" title="C (programming language)">C</a>, <a href="/wiki/C%2B%2B" title="C++">C++</a>, Java, <a href="/wiki/Interface_description_language" title="Interface description language">IDL</a>, <a href="/wiki/Visual_Expert" title="Visual Expert">Visual Expert</a> for <a href="/wiki/PL/SQL" title="PL/SQL">PL/SQL</a>, <a href="/wiki/Transact-SQL" title="Transact-SQL">Transact-SQL</a>, <a href="/wiki/PowerBuilder" title="PowerBuilder">PowerBuilder</a>, and <a href="/wiki/PHPDoc" title="PHPDoc">PHPDoc</a> for <a href="/wiki/PHP" title="PHP">PHP</a>. Forms of <a href="/wiki/Docstring" title="Docstring">docstring</a> are supported by <a href="/wiki/Python_(programming_language)" title="Python (programming language)">Python</a>, <a href="/wiki/Lisp_(programming_language)" title="Lisp (programming language)">Lisp</a>, <a href="/wiki/Elixir_(programming_language)" title="Elixir (programming language)">Elixir</a>, and <a href="/wiki/Clojure" title="Clojure">Clojure</a>.<sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">&#91;</span>18<span class="cite-bracket">&#93;</span></a></sup> </p><p><a href="/wiki/C_Sharp_(programming_language)" title="C Sharp (programming language)">C#</a>, <a href="/wiki/F_Sharp_(programming_language)" title="F Sharp (programming language)">F#</a> and <a href="/wiki/Visual_Basic_.NET" class="mw-redirect" title="Visual Basic .NET">Visual Basic .NET</a> implement a similar feature called "XML Comments" which are read by <a href="/wiki/IntelliSense" class="mw-redirect" title="IntelliSense">IntelliSense</a> from the compiled <a href="/wiki/.NET" title=".NET">.NET</a> assembly.<sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite-bracket">&#91;</span>19<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Syntax_extension">Syntax extension</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=10" title="Edit section: Syntax extension"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Occasionally syntax elements that were originally intended to be comments are re-purposed to convey additional information to a program, such as "<a href="/wiki/Conditional_comment" title="Conditional comment">conditional comments</a>". Such "hot comments" may be the only practical solution that maintains backward-compatibility, but are widely regarded as a <a href="/wiki/Kludge" title="Kludge">kludge</a>.<sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite-bracket">&#91;</span>20<span class="cite-bracket">&#93;</span></a></sup> </p><p>One specific example are <b>docblocks</b>, which are specially-formatted comments used to document a specific segment of code. This makes the DocBlock format independent of the target language (as long as it supports comments); however, it may also lead to multiple or inconsistent standards. </p> <div class="mw-heading mw-heading3"><h3 id="Directive_uses">Directive uses</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=11" title="Edit section: Directive uses"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>There are cases where the normal comment characters are co-opted to create a special <a href="/wiki/Directive_(programming)" title="Directive (programming)">directive</a> for an editor or interpreter. </p><p>Two examples of this directing an interpreter are: </p> <ul><li>The Unix "<a href="/wiki/Shebang_(Unix)" title="Shebang (Unix)">shebang</a>" – <code>#!</code> – used on the first line of a script to point to the interpreter to be used.</li> <li>"Magic comments" identifying the encoding a source file is using,<sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span class="cite-bracket">&#91;</span>21<span class="cite-bracket">&#93;</span></a></sup> e.g. Python's PEP 263.<sup id="cite_ref-22" class="reference"><a href="#cite_note-22"><span class="cite-bracket">&#91;</span>22<span class="cite-bracket">&#93;</span></a></sup></li></ul> <p>The script below for a Unix-like system shows both of these uses: </p> <div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span></span><span class="ch">#!/usr/bin/env python3</span> <span class="c1"># -*- coding: UTF-8 -*-</span> <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Testing&quot;</span><span class="p">)</span> </pre></div> <p>Somewhat similar is the use of comments in C to communicate to a compiler that a default "fallthrough" in a <a href="/wiki/Case_statement" class="mw-redirect" title="Case statement">case statement</a> has been done deliberately: </p> <div class="mw-highlight mw-highlight-lang-java mw-content-ltr mw-highlight-lines" dir="ltr"><pre><span></span><span class="linenos" data-line="1"></span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">command</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> <span class="linenos" data-line="2"></span><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="n">CMD_SHOW_HELP_AND_EXIT</span><span class="p">:</span> <span class="linenos" data-line="3"></span><span class="w"> </span><span class="n">do_show_help</span><span class="p">();</span> <span class="linenos" data-line="4"></span><span class="w"> </span><span class="cm">/* Fall thru */</span> <span class="linenos" data-line="5"></span><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="n">CMD_EXIT</span><span class="p">:</span> <span class="linenos" data-line="6"></span><span class="w"> </span><span class="n">do_exit</span><span class="p">();</span> <span class="linenos" data-line="7"></span><span class="w"> </span><span class="k">break</span><span class="p">;</span> <span class="linenos" data-line="8"></span><span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="n">CMD_OTHER</span><span class="p">:</span> <span class="linenos" data-line="9"></span><span class="w"> </span><span class="n">do_other</span><span class="p">();</span> <span class="linenos" data-line="10"></span><span class="w"> </span><span class="k">break</span><span class="p">;</span> <span class="linenos" data-line="11"></span><span class="w"> </span><span class="cm">/* ... etc. ... */</span> <span class="linenos" data-line="12"></span><span class="w"> </span><span class="p">}</span> </pre></div> <p>Inserting such a <code>/* Fall thru */</code> comment for human readers was already a common convention, but in 2017 the <a href="/wiki/GNU_Compiler_Collection" title="GNU Compiler Collection">gcc</a> compiler began looking for these (or other indications of deliberate intent), and, if not found, emitting: "warning: this statement may fall through".<sup id="cite_ref-23" class="reference"><a href="#cite_note-23"><span class="cite-bracket">&#91;</span>23<span class="cite-bracket">&#93;</span></a></sup> </p><p>Many editors and <a href="/wiki/Integrated_development_environment" title="Integrated development environment">IDEs</a> will read specially formatted comments. For example, the "modeline" feature of <a href="/wiki/Vim_(text_editor)" title="Vim (text editor)">Vim</a>; which would change its handling of tabs while editing a source with this comment included near the top of the file: </p> <pre># vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 </pre> <div class="mw-heading mw-heading3"><h3 id="Stress_relief">Stress relief</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=12" title="Edit section: Stress relief"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Sometimes programmers will add comments as a way to relieve stress by commenting about development tools, competitors, employers, working conditions, or the quality of the code itself.<sup id="cite_ref-24" class="reference"><a href="#cite_note-24"><span class="cite-bracket">&#91;</span>24<span class="cite-bracket">&#93;</span></a></sup> The occurrence of this phenomenon can be easily seen from online resources that track <a href="/wiki/Profanity" title="Profanity">profanity</a> in source code.<sup id="cite_ref-SwearWords_25-0" class="reference"><a href="#cite_note-SwearWords-25"><span class="cite-bracket">&#91;</span>25<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="Normative_views">Normative views</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=13" title="Edit section: Normative views"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>There are various normative views and long-standing opinions regarding the proper use of comments in source code.<sup id="cite_ref-26" class="reference"><a href="#cite_note-26"><span class="cite-bracket">&#91;</span>26<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-27" class="reference"><a href="#cite_note-27"><span class="cite-bracket">&#91;</span>27<span class="cite-bracket">&#93;</span></a></sup> Some of these are informal and based on personal preference, while others are published or promulgated as formal guidelines for a particular community.<sup id="cite_ref-28" class="reference"><a href="#cite_note-28"><span class="cite-bracket">&#91;</span>28<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Need_for_comments">Need for comments</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=14" title="Edit section: Need for comments"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Experts have varying viewpoints on whether, and when, comments are appropriate in source code.<sup id="cite_ref-BadComment000_9-1" class="reference"><a href="#cite_note-BadComment000-9"><span class="cite-bracket">&#91;</span>9<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-BadComments001_29-0" class="reference"><a href="#cite_note-BadComments001-29"><span class="cite-bracket">&#91;</span>29<span class="cite-bracket">&#93;</span></a></sup> Some assert that source code should be written with few comments, on the basis that the source code should be self-explanatory or <a href="/wiki/Self-documenting" class="mw-redirect" title="Self-documenting">self-documenting</a>.<sup id="cite_ref-BadComment000_9-2" class="reference"><a href="#cite_note-BadComment000-9"><span class="cite-bracket">&#91;</span>9<span class="cite-bracket">&#93;</span></a></sup> Others suggest code should be extensively commented (it is not uncommon for over 50% of the non-<a href="/wiki/Whitespace_(computer_science)" class="mw-redirect" title="Whitespace (computer science)">whitespace</a> characters in source code to be contained within comments).<sup id="cite_ref-Morelli000_30-0" class="reference"><a href="#cite_note-Morelli000-30"><span class="cite-bracket">&#91;</span>30<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-Javadoc000_31-0" class="reference"><a href="#cite_note-Javadoc000-31"><span class="cite-bracket">&#91;</span>31<span class="cite-bracket">&#93;</span></a></sup> </p><p>In between these views is the assertion that comments are neither beneficial nor harmful by themselves, and what matters is that they are correct and kept in sync with the source code, and omitted if they are superfluous, excessive, difficult to maintain or otherwise unhelpful.<sup id="cite_ref-techniques001_32-0" class="reference"><a href="#cite_note-techniques001-32"><span class="cite-bracket">&#91;</span>32<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-CmmtPhilosophy_33-0" class="reference"><a href="#cite_note-CmmtPhilosophy-33"><span class="cite-bracket">&#91;</span>33<span class="cite-bracket">&#93;</span></a></sup> </p><p>Comments are sometimes used to document contracts in the <a href="/wiki/Design_by_contract" title="Design by contract">design by contract</a> approach to programming. </p> <div class="mw-heading mw-heading3"><h3 id="Level_of_detail">Level of detail</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=15" title="Edit section: Level of detail"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Depending on the intended audience of the code and other considerations, the level of detail and description may vary considerably. </p><p>For example, the following Java comment would be suitable in an introductory text designed to teach beginning programming: </p> <div class="mw-highlight mw-highlight-lang-java mw-content-ltr" dir="ltr"><pre><span></span><span class="n">String</span><span class="w"> </span><span class="n">s</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;Wikipedia&quot;</span><span class="p">;</span><span class="w"> </span><span class="cm">/* Assigns the value &quot;Wikipedia&quot; to the variable s. */</span> </pre></div> <p>This level of detail, however, would not be appropriate in the context of production code, or other situations involving experienced developers. Such rudimentary descriptions are inconsistent with the guideline: "Good comments ... clarify intent."<sup id="cite_ref-GoodComment000_10-1" class="reference"><a href="#cite_note-GoodComment000-10"><span class="cite-bracket">&#91;</span>10<span class="cite-bracket">&#93;</span></a></sup> Further, for professional coding environments, the level of detail is ordinarily well defined to meet a specific performance requirement defined by business operations.<sup id="cite_ref-Javadoc000_31-1" class="reference"><a href="#cite_note-Javadoc000-31"><span class="cite-bracket">&#91;</span>31<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="Styles">Styles</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=16" title="Edit section: Styles"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>There are many stylistic alternatives available when considering how comments should appear in source code. For larger projects involving a team of developers, comment styles are either agreed upon before a project starts, or evolve as a matter of convention or need as a project grows. Usually programmers prefer styles that are consistent, non-obstructive, easy to modify, and difficult to break.<sup id="cite_ref-gnome000_34-0" class="reference"><a href="#cite_note-gnome000-34"><span class="cite-bracket">&#91;</span>34<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Block_comment">Block comment</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=17" title="Edit section: Block comment"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The following code fragments in C demonstrate just a tiny example of how comments can vary stylistically, while still conveying the same basic information: </p> <div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span></span><span class="cm">/*</span> <span class="cm"> This is the comment body.</span> <span class="cm"> Variation One.</span> <span class="cm">*/</span> </pre></div> <div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span></span><span class="cm">/***************************\</span> <span class="cm">* *</span> <span class="cm">* This is the comment body. *</span> <span class="cm">* Variation Two. *</span> <span class="cm">* *</span> <span class="cm">\***************************/</span> </pre></div> <p>Factors such as personal preference, flexibility of programming tools, and other considerations tend to influence the stylistic variants used in source code. For example, Variation Two might be disfavored among programmers who do not have <a href="/wiki/Source_code_editor" class="mw-redirect" title="Source code editor">source code editors</a> that can automate the alignment and visual appearance of text in comments. </p><p>Software consultant and technology commentator <a href="/wiki/Allen_Holub" title="Allen Holub">Allen Holub</a><sup id="cite_ref-Holub000_35-0" class="reference"><a href="#cite_note-Holub000-35"><span class="cite-bracket">&#91;</span>35<span class="cite-bracket">&#93;</span></a></sup> is one expert who advocates aligning the left edges of comments:<sup id="cite_ref-Holub001_36-0" class="reference"><a href="#cite_note-Holub001-36"><span class="cite-bracket">&#91;</span>36<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="cm">/* This is the style recommended by Holub for C and C++.</span> <span class="cm"> * It is demonstrated in &#39;&#39;Enough Rope&#39;&#39;, in rule 29.</span> <span class="cm"> */</span> </pre></div> <div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="cm">/* This is another way to do it, also in C.</span> <span class="cm"> ** It is easier to do in editors that do not automatically indent the second</span> <span class="cm"> ** through last lines of the comment one space from the first.</span> <span class="cm"> ** It is also used in Holub&#39;s book, in rule 31.</span> <span class="cm"> */</span> </pre></div> <p>The use of /* and */ as block comment delimiters was inherited from PL/I into the B programming language, the immediate predecessor of the C programming language.<sup id="cite_ref-Thompson1972_37-0" class="reference"><a href="#cite_note-Thompson1972-37"><span class="cite-bracket">&#91;</span>37<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Line_comments">Line comments</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=18" title="Edit section: Line comments"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Line comments generally use an arbitrary <a href="/wiki/Delimiter" title="Delimiter">delimiter</a> or sequence of <a href="/wiki/Token_(parser)" class="mw-redirect" title="Token (parser)">tokens</a> to indicate the beginning of a comment, and a <a href="/wiki/Newline" title="Newline">newline</a> character to indicate the end of a comment. </p><p>In this example, all the text from the ASCII characters // to the end of the line is ignored. </p> <div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">// -------------------------</span> <span class="c1">// This is the comment body.</span> <span class="c1">// -------------------------</span> </pre></div> <p>Often such a comment has to begin at far left and extend to the whole line. However, in many languages, it is also possible to put a comment <i>inline</i> with a command line, to add a comment to it – as in this Perl example: </p> <div class="mw-highlight mw-highlight-lang-perl mw-content-ltr" dir="ltr"><pre><span></span><span class="k">print</span><span class="w"> </span><span class="nv">$s</span><span class="w"> </span><span class="o">.</span><span class="w"> </span><span class="s">&quot;\n&quot;</span><span class="p">;</span><span class="w"> </span><span class="c1"># Add a newline character after printing</span> </pre></div> <p>If a language allows both line comments and block comments, programming teams may decide upon a convention of using them differently: e.g. line comments only for minor comments, and block comments to describe higher-level abstractions. </p> <div class="mw-heading mw-heading2"><h2 id="Tags">Tags</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=19" title="Edit section: Tags"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Programmers may use informal <a href="/wiki/Tag_(metadata)" title="Tag (metadata)">tags</a> in comments to assist in indexing common issues. They may then be able to be searched for with common programming tools, such as the <a href="/wiki/Unix" title="Unix">Unix</a> <a href="/wiki/Grep" title="Grep">grep</a> utility or even <a href="/wiki/Syntax_highlighting" title="Syntax highlighting">syntax-highlighted</a> within <a href="/wiki/Text_editor" title="Text editor">text editors</a>. These are sometimes referred to as "codetags"<sup id="cite_ref-38" class="reference"><a href="#cite_note-38"><span class="cite-bracket">&#91;</span>38<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-39" class="reference"><a href="#cite_note-39"><span class="cite-bracket">&#91;</span>39<span class="cite-bracket">&#93;</span></a></sup> or "tokens", and the development tools might even assist you in listing all of them.<sup id="cite_ref-40" class="reference"><a href="#cite_note-40"><span class="cite-bracket">&#91;</span>40<span class="cite-bracket">&#93;</span></a></sup> </p><p>Such tags differ widely, but might include: </p> <ul><li>BUG, DEBUG — a known <a href="/wiki/Software_bug" title="Software bug">bug</a> that should be corrected.</li> <li>FIXME — should be corrected.</li> <li>HACK, BODGE, KLUDGE — a workaround.</li> <li>TODO — something to be done.</li> <li>NOTE — used to highlight especially notable <a href="/wiki/Gotcha_(programming)" title="Gotcha (programming)">gotchas</a>.</li> <li>UNDONE — a reversal or "roll back" of previous code.</li> <li>XXX — warn other programmers of problematic or misguiding code</li></ul> <div class="mw-heading mw-heading2"><h2 id="Examples">Examples</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=20" title="Edit section: Examples"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="Comparison">Comparison</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=21" title="Edit section: Comparison"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Comparison_of_programming_languages_(syntax)#Comments" title="Comparison of programming languages (syntax)">Comparison of programming languages (syntax) §&#160;Comments</a></div> <p>Typographic conventions to specify comments vary widely. Further, individual programming languages sometimes provide unique variants. </p> <div class="mw-heading mw-heading4"><h4 id="Ada">Ada</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=22" title="Edit section: Ada"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The <a href="/wiki/Ada_(programming_language)" title="Ada (programming language)">Ada</a> programming language uses '--' to indicate a comment up to the end of the line. </p><p>For example: </p> <div class="mw-highlight mw-highlight-lang-ada mw-content-ltr" dir="ltr"><pre><span></span> <span class="c1">-- the air traffic controller task takes requests for takeoff and landing</span> <span class="kd">task</span> <span class="kd">type</span> <span class="kt">Controller</span> <span class="p">(</span><span class="nv">My_Runway</span><span class="p">: </span><span class="nv">Runway_Access</span><span class="p">)</span> <span class="kr">is</span> <span class="c1">-- task entries for synchronous message passing</span> <span class="kd">entry</span> <span class="nf">Request_Takeoff</span> <span class="p">(</span><span class="nv">ID</span><span class="p">: </span><span class="nv">in</span> <span class="nv">Airplane_ID</span><span class="p">;</span> <span class="nv">Takeoff</span><span class="p">: </span><span class="nv">out</span> <span class="nv">Runway_Access</span><span class="p">);</span> <span class="kd">entry</span> <span class="nf">Request_Approach</span><span class="p">(</span><span class="nv">ID</span><span class="p">: </span><span class="nv">in</span> <span class="nv">Airplane_ID</span><span class="p">;</span> <span class="nv">Approach</span><span class="p">: </span><span class="nv">out</span> <span class="nv">Runway_Access</span><span class="p">);</span> <span class="kr">end</span> <span class="nf">Controller</span><span class="p">;</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="APL">APL</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=23" title="Edit section: APL"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/APL_(programming_language)" title="APL (programming language)">APL</a> uses <code>⍝</code> to indicate a comment up to the end of the line. </p><p>For example: </p> <div class="mw-highlight mw-highlight-lang-apl mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">⍝ Now add the numbers:</span> <span class="nv">c</span><span class="kd">←</span><span class="nv">a</span><span class="o">+</span><span class="nv">b</span><span class="w"> </span><span class="c1">⍝ addition</span> </pre></div> <p>In dialects that have the <code>⊣</code> ("left") and <code>⊢</code> ("right") primitives, comments can often be <i>inside</i> or separate statements, in the form of ignored strings: </p> <div class="mw-highlight mw-highlight-lang-apl mw-content-ltr" dir="ltr"><pre><span></span><span class="nv">d</span><span class="kd">←</span><span class="m">2</span><span class="o">×</span><span class="nv">c</span><span class="w"> </span><span class="o">⊣</span><span class="s1">&#39;where&#39;</span><span class="o">⊢</span><span class="w"> </span><span class="nv">c</span><span class="kd">←</span><span class="nv">a</span><span class="o">+</span><span class="w"> </span><span class="s1">&#39;bound&#39;</span><span class="o">⊢</span><span class="w"> </span><span class="nv">b</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="AppleScript">AppleScript</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=24" title="Edit section: AppleScript"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This section of <a href="/wiki/AppleScript" title="AppleScript">AppleScript</a> code shows the two styles of comments used in that language. </p> <div class="mw-highlight mw-highlight-lang-applescript mw-content-ltr" dir="ltr"><pre><span></span><span class="cm">(*</span> <span class="cm">This program displays a greeting.</span> <span class="cm">*)</span> <span class="k">on</span> <span class="nv">greet</span><span class="p">(</span><span class="nv">myGreeting</span><span class="p">)</span> <span class="nb">display dialog</span> <span class="nv">myGreeting</span> <span class="o">&amp;</span> <span class="s2">&quot; world!&quot;</span> <span class="k">end</span> <span class="nv">greet</span> <span class="c">-- Show the greeting</span> <span class="nv">greet</span><span class="p">(</span><span class="s2">&quot;Hello&quot;</span><span class="p">)</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="BASIC">BASIC</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=25" title="Edit section: BASIC"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In this classic early <a href="/wiki/BASIC" title="BASIC">BASIC</a> code fragment the REM (<i>"Remark"</i>) keyword is used to add comments. </p> <div class="mw-highlight mw-highlight-lang-basic mw-content-ltr" dir="ltr"><pre><span></span><span class="nl">10</span><span class="w"> </span><span class="c1">REM This BASIC program shows the use of the PRINT and GOTO Statements.</span> <span class="nl">15</span><span class="w"> </span><span class="c1">REM It fills the screen with the phrase &quot;HELLO&quot;</span> <span class="nl">20</span><span class="w"> </span><span class="kr">PRINT</span><span class="w"> </span><span class="s2">&quot;HELLO&quot;</span> <span class="nl">30</span><span class="w"> </span><span class="kr">GOTO</span><span class="w"> </span><span class="nl">20</span> </pre></div> <p>In later <a href="/wiki/Microsoft" title="Microsoft">Microsoft</a> BASICs, including <a href="/wiki/Quick_Basic" class="mw-redirect" title="Quick Basic">Quick Basic</a>, <a href="/wiki/Q_Basic" class="mw-redirect" title="Q Basic">Q Basic</a>, <a href="/wiki/Visual_Basic" title="Visual Basic">Visual Basic</a>, <a href="/wiki/Visual_Basic_.NET" class="mw-redirect" title="Visual Basic .NET">Visual Basic .NET</a>, and <a href="/wiki/VB_Script" class="mw-redirect" title="VB Script">VB Script</a>; and in descendants such as <a href="/wiki/FreeBASIC" title="FreeBASIC">FreeBASIC</a> and <a href="/wiki/Gambas" title="Gambas">Gambas</a> any text on a line after an ' (apostrophe) character is also treated as a comment. </p><p>An example in Visual Basic .NET: </p> <div class="mw-highlight mw-highlight-lang-vbnet mw-content-ltr" dir="ltr"><pre><span></span><span class="k">Public</span><span class="w"> </span><span class="k">Class</span><span class="w"> </span><span class="nc">Form1</span> <span class="w"> </span><span class="k">Private</span><span class="w"> </span><span class="k">Sub</span><span class="w"> </span><span class="nf">Button1_Click</span><span class="p">(</span><span class="n">sender</span><span class="w"> </span><span class="ow">As</span><span class="w"> </span><span class="kt">Object</span><span class="p">,</span><span class="w"> </span><span class="n">e</span><span class="w"> </span><span class="ow">As</span><span class="w"> </span><span class="n">EventArgs</span><span class="p">)</span><span class="w"> </span><span class="k">Handles</span><span class="w"> </span><span class="n">Button1</span><span class="p">.</span><span class="n">Click</span> <span class="w"> </span><span class="c">&#39; The following code is executed when the user</span> <span class="w"> </span><span class="c">&#39; clicks the button in the program&#39;s window.</span> <span class="w"> </span><span class="c">rem comments still exist.</span> <span class="w"> </span><span class="n">MessageBox</span><span class="p">.</span><span class="n">Show</span><span class="p">(</span><span class="s">&quot;Hello, World&quot;</span><span class="p">)</span><span class="w"> </span><span class="c">&#39;Show a pop-up window with a greeting</span> <span class="w"> </span><span class="k">End</span><span class="w"> </span><span class="k">Sub</span> <span class="k">End</span><span class="w"> </span><span class="k">Class</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="C">C</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=26" title="Edit section: C"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This <a href="/wiki/C_(programming_language)" title="C (programming language)">C</a> code fragment demonstrates the use of a prologue comment or "block comment" to describe the purpose of a <a href="/wiki/Conditional_(programming)" class="mw-redirect" title="Conditional (programming)">conditional statement</a>. The comment explains key terms and concepts, and includes a short signature by the programmer who authored the code. </p> <div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="cm">/*</span> <span class="cm"> * Check if we are over our maximum process limit, but be sure to</span> <span class="cm"> * exclude root. This is needed to make it possible for login and</span> <span class="cm"> * friends to set the per-user process limit to something lower</span> <span class="cm"> * than the amount of processes root is running. -- Rik</span> <span class="cm"> */</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">atomic_read</span><span class="p">(</span><span class="o">&amp;</span><span class="n">p</span><span class="o">-&gt;</span><span class="n">user</span><span class="o">-&gt;</span><span class="n">processes</span><span class="p">)</span><span class="w"> </span><span class="o">&gt;=</span><span class="w"> </span><span class="n">p</span><span class="o">-&gt;</span><span class="n">rlim</span><span class="p">[</span><span class="n">RLIMIT_NPROC</span><span class="p">].</span><span class="n">rlim_cur</span> <span class="w"> </span><span class="o">&amp;&amp;</span><span class="w"> </span><span class="o">!</span><span class="n">capable</span><span class="p">(</span><span class="n">CAP_SYS_ADMIN</span><span class="p">)</span><span class="w"> </span><span class="o">&amp;&amp;</span><span class="w"> </span><span class="o">!</span><span class="n">capable</span><span class="p">(</span><span class="n">CAP_SYS_RESOURCE</span><span class="p">))</span> <span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">bad_fork_free</span><span class="p">;</span> </pre></div> <p>Since C99, it has also been possible to use the // syntax from C++, indicating a single-line comment. </p><p><br /> The availability of block comments allows for marking structural breakouts, i.e. admissible violations of the single-entry/single-exit rule of <a href="/wiki/Structured_Programming" class="mw-redirect" title="Structured Programming">Structured Programming</a>, visibly, like in the following example: </p> <div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span></span><span class="k">static</span><span class="w"> </span><span class="n">Edge</span><span class="w"> </span><span class="nf">edge_any</span><span class="p">(</span><span class="n">Node</span><span class="w"> </span><span class="n">n</span><span class="p">,</span><span class="w"> </span><span class="n">Node</span><span class="w"> </span><span class="n">m</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="c1">// Returns whether any edge is between nodes $n and $m.</span> <span class="w"> </span><span class="n">Edge</span><span class="w"> </span><span class="n">e</span><span class="p">;</span> <span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">e</span><span class="o">=</span><span class="n">n</span><span class="o">-&gt;</span><span class="n">edges</span><span class="p">;</span><span class="w"> </span><span class="n">e</span><span class="p">;</span><span class="w"> </span><span class="n">e</span><span class="o">=</span><span class="n">e</span><span class="o">-&gt;</span><span class="n">next</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">e</span><span class="o">-&gt;</span><span class="n">dst</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">m</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> <span class="cm">/*********/</span><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">e</span><span class="p">;</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">e</span><span class="o">=</span><span class="n">m</span><span class="o">-&gt;</span><span class="n">edges</span><span class="p">;</span><span class="w"> </span><span class="n">e</span><span class="p">;</span><span class="w"> </span><span class="n">e</span><span class="o">=</span><span class="n">e</span><span class="o">-&gt;</span><span class="n">next</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">e</span><span class="o">-&gt;</span><span class="n">dst</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">n</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="cm">/*****/</span><span class="w"> </span><span class="k">break</span><span class="p">;</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">e</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> </pre></div> <p>In many languages lacking a block comment, e.g. <a href="/wiki/AWK" title="AWK">awk</a>, you can use sequences of statement separators like <code>;</code> instead. But it's impossible in languages using indentation as a rigid indication of intended block structure, like <a href="/wiki/Python_(programming_language)" title="Python (programming language)">Python</a>. </p> <div class="mw-heading mw-heading4"><h4 id="Cisco_IOS_and_IOS-XE_configuration">Cisco IOS and IOS-XE configuration</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=27" title="Edit section: Cisco IOS and IOS-XE configuration"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The <a href="/wiki/Exclamation_point" class="mw-redirect" title="Exclamation point">exclamation point</a> (<b>!</b>) may be used to mark comments in a Cisco router's configuration mode, however such comments are <i>not</i> saved to <a href="/wiki/Non-volatile_memory" title="Non-volatile memory">non-volatile memory</a> (which contains the startup-config), nor are they displayed by the "show run" command.<sup id="cite_ref-41" class="reference"><a href="#cite_note-41"><span class="cite-bracket">&#91;</span>41<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-42" class="reference"><a href="#cite_note-42"><span class="cite-bracket">&#91;</span>42<span class="cite-bracket">&#93;</span></a></sup> </p><p>It is possible to insert <a href="/wiki/Human-readable" class="mw-redirect" title="Human-readable">human-readable</a> content that is actually part of the configuration, and may be saved to the <a href="/wiki/NVRAM" class="mw-redirect" title="NVRAM">NVRAM</a> startup-config via: </p> <ul><li>The "description" command, used to add a description to the configuration of an interface or of a <a href="/wiki/BGP" class="mw-redirect" title="BGP">BGP</a> neighbor</li> <li>The "name" parameter, to add a remark to a static route</li> <li>The "remark" command in access lists</li></ul> <div class="mw-highlight mw-highlight-lang-text mw-content-ltr" dir="ltr"><pre><span></span>! Paste the text below to reroute traffic manually config t int gi0/2 no shut ip route 0.0.0.0 0.0.0.0 gi0/2 name ISP2 no ip route 0.0.0.0 0.0.0.0 gi0/1 name ISP1 int gi0/1 shut exit </pre></div> <div class="mw-heading mw-heading4"><h4 id="ColdFusion">ColdFusion</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=28" title="Edit section: ColdFusion"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/ColdFusion" class="mw-redirect" title="ColdFusion">ColdFusion</a> uses comments similar to <a href="/wiki/HTML_comment" class="mw-redirect" title="HTML comment">HTML comments</a>, but instead of two dashes, it uses three. These comments are caught by the ColdFusion engine and not printed to the browser. </p><p>Such comments are nestable. </p> <div class="mw-highlight mw-highlight-lang-cfm mw-content-ltr" dir="ltr"><pre><span></span> <span class="cm">&lt;!--- This prints &quot;Hello World&quot; to the browser.</span> <span class="cm"> &lt;!--- This is a comment used inside the first one.</span> <span class="cm"> ---&gt;</span> <span class="cm"> ---&gt;</span> <span class="nb">&lt;cfoutput&gt;</span> Hello World<span class="p">&lt;</span><span class="nt">br</span> <span class="p">/&gt;</span> <span class="nb">&lt;/cfoutput&gt;</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="D">D</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=29" title="Edit section: D"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/D_(programming_language)" title="D (programming language)">D</a> uses C++-style comments, as well as nestable D-style multiline comments, which start with '/+' and end with '+/'. </p> <div class="mw-highlight mw-highlight-lang-d mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">// This is a single-line comment.</span> <span class="cm">/* This is a multiline comment.</span> <span class="cm">*/</span> <span class="cm">/+ This is a</span> <span class="cm"> /+ nested +/</span> <span class="cm"> comment +/</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Fortran_IV">Fortran IV</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=30" title="Edit section: Fortran IV"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This <a href="/wiki/Fortran_IV" class="mw-redirect" title="Fortran IV">Fortran IV</a> code fragment demonstrates how comments are used in that language, which is very column-oriented. A letter "C" in column 1 causes the entire line to be treated as a comment. </p> <div class="mw-highlight mw-highlight-lang-fortranfixed mw-content-ltr" dir="ltr"><pre><span></span><span class="c">C</span> <span class="c">C Lines that begin with &#39;C&#39; (in the first or &#39;comment&#39; column) are comments</span> <span class="c">C</span> <span class="nl"> </span> <span class="k">WRITE</span><span class="w"> </span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="mi">610</span><span class="p">)</span> <span class="nl"> 610</span> <span class="k">FORMAT</span><span class="p">(</span><span class="mi">12</span><span class="n">H</span><span class="w"> </span><span class="n">HELLO</span><span class="w"> </span><span class="n">WORLD</span><span class="p">)</span> <span class="nl"> </span> <span class="k">END</span> </pre></div> <p>Note that the columns of a line are otherwise treated as four fields: 1 to 5 is the label field, 6 causes the line to be taken as a continuation of the previous statement; and declarations and statements go in 7 to 72. </p> <div class="mw-heading mw-heading4"><h4 id="Fortran_90">Fortran 90</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=31" title="Edit section: Fortran 90"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This <a href="/wiki/Fortran" title="Fortran">Fortran</a> code fragment demonstrates how comments are used in that language, with the comments themselves describing the basic formatting rules. </p> <div class="mw-highlight mw-highlight-lang-fortran mw-content-ltr" dir="ltr"><pre><span></span><span class="c">!* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *</span> <span class="c">!* All characters after an exclamation mark are considered as comments *</span> <span class="c">!* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *</span> <span class="k">program </span><span class="n">comment_test</span> <span class="w"> </span><span class="k">print</span><span class="w"> </span><span class="s1">&#39;(A)&#39;</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;Hello world&#39;</span><span class="w"> </span><span class="c">! Fortran 90 introduced the option for inline comments.</span> <span class="k">end program</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Haskell">Haskell</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=32" title="Edit section: Haskell"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Line comments in Haskell start with '--' (two hyphens) until the end of line, and multiple line comments start with '{-' and end with '-}'. </p> <div class="mw-highlight mw-highlight-lang-haskell mw-content-ltr" dir="ltr"><pre><span></span><span class="cm">{- this is a comment</span> <span class="cm">on more lines -}</span> <span class="c1">-- and this is a comment on one line</span> <span class="nf">putStrLn</span><span class="w"> </span><span class="s">&quot;Wikipedia&quot;</span><span class="w"> </span><span class="c1">-- this is another comment</span> </pre></div> <p>Haskell also provides a <a href="/wiki/Literate_programming" title="Literate programming">literate programming</a> method of commenting known as "Bird Style".<sup id="cite_ref-43" class="reference"><a href="#cite_note-43"><span class="cite-bracket">&#91;</span>43<span class="cite-bracket">&#93;</span></a></sup> In this all lines starting with &gt; are interpreted as code, everything else is considered a comment. One additional requirement is that you always leave a blank line before and after the code block: </p> <div class="mw-highlight mw-highlight-lang-lhaskell mw-content-ltr" dir="ltr"><pre><span></span>In Bird-style you have to leave a blank before the code. <span class="cs">&gt; </span><span class="nf">fact</span><span class="w"> </span><span class="ow">::</span><span class="w"> </span><span class="kt">Integer</span><span class="w"> </span><span class="ow">-&gt;</span><span class="w"> </span><span class="kt">Integer</span> <span class="cs">&gt; </span><span class="nf">fact</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="ow">=</span><span class="w"> </span><span class="mi">1</span> <span class="cs">&gt; </span><span class="nf">fact</span><span class="w"> </span><span class="p">(</span><span class="n">n</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="ow">=</span><span class="w"> </span><span class="p">(</span><span class="n">n</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">fact</span><span class="w"> </span><span class="n">n</span> And you have to leave a blank line after the code as well. </pre></div> <p>Literate programming can also be done in Haskell, using <a href="/wiki/LaTeX" title="LaTeX">LaTeX</a>. The code environment can be used instead of the Richard Bird's style: In <a href="/wiki/LaTeX" title="LaTeX">LaTeX</a> style this is equivalent to the above example, the code environment could be defined in the LaTeX preamble. Here is a simple definition: </p> <div class="mw-highlight mw-highlight-lang-lhaskell mw-content-ltr" dir="ltr"><pre><span></span><span class="k">\usepackage</span><span class="nb">{</span>verbatim<span class="nb">}</span> <span class="k">\newenvironment</span><span class="nb">{</span>code<span class="nb">}{</span><span class="k">\verbatim</span><span class="nb">}{</span><span class="k">\endverbatim</span><span class="nb">}</span> </pre></div> <p>later in </p> <div class="mw-highlight mw-highlight-lang-lhaskell mw-content-ltr" dir="ltr"><pre><span></span><span class="c">% the LaTeX source file</span> The <span class="k">\verb</span>|fact n| function call computes <span class="s">$</span><span class="nb">n</span><span class="o">!</span><span class="s">$</span> if <span class="s">$</span><span class="nb">n</span><span class="nv">\ge</span><span class="nb"> </span><span class="m">0</span><span class="s">$</span>, here is a definition:<span class="k">\\</span> <span class="k">\begin</span><span class="nb">{</span>code<span class="nb">}</span> <span class="nf">fact</span><span class="w"> </span><span class="ow">::</span><span class="w"> </span><span class="kt">Integer</span><span class="w"> </span><span class="ow">-&gt;</span><span class="w"> </span><span class="kt">Integer</span> <span class="nf">fact</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="ow">=</span><span class="w"> </span><span class="mi">1</span> <span class="nf">fact</span><span class="w"> </span><span class="p">(</span><span class="n">n</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="ow">=</span><span class="w"> </span><span class="p">(</span><span class="n">n</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">fact</span><span class="w"> </span><span class="n">n</span> <span class="k">\end</span><span class="nb">{</span>code<span class="nb">}</span> Here more explanation using <span class="k">\LaTeX</span><span class="nb">{}</span> markup </pre></div> <div class="mw-heading mw-heading4"><h4 id="Java">Java</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=33" title="Edit section: Java"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This <a href="/wiki/Java_(programming_language)" title="Java (programming language)">Java</a> code fragment shows a block comment used to describe the <code>setToolTipText</code> method. The formatting is consistent with <a href="/wiki/Sun_Microsystems" title="Sun Microsystems">Sun Microsystems</a> <a href="/wiki/Javadoc" title="Javadoc">Javadoc</a> standards. The comment is designed to be read by the Javadoc processor. </p> <div class="mw-highlight mw-highlight-lang-java mw-content-ltr" dir="ltr"><pre><span></span><span class="cm">/**</span> <span class="cm"> * This is a block comment in Java.</span> <span class="cm"> * The setToolTipText method registers the text to display in a tool tip.</span> <span class="cm"> * The text is displayed when the cursor lingers over the component.</span> <span class="cm"> *</span> <span class="cm"> * @param text The string to be displayed. If &#39;text&#39; is null,</span> <span class="cm"> * the tool tip is turned off for this component.</span> <span class="cm"> */</span> <span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">setToolTipText</span><span class="p">(</span><span class="n">String</span><span class="w"> </span><span class="n">text</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="c1">// This is an inline comment in Java. TODO: Write code for this method.</span> <span class="p">}</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="JavaScript">JavaScript</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=34" title="Edit section: JavaScript"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/JavaScript_(programming_language)" class="mw-redirect" title="JavaScript (programming language)">JavaScript</a> uses // to precede comments and /* */ for multi-line comments. </p> <div class="mw-highlight mw-highlight-lang-javascript mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">// A single line JavaScript comment</span> <span class="kd">var</span><span class="w"> </span><span class="nx">iNum</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">100</span><span class="p">;</span> <span class="kd">var</span><span class="w"> </span><span class="nx">iTwo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">2</span><span class="p">;</span><span class="w"> </span><span class="c1">// A comment at the end of line</span> <span class="cm">/*</span> <span class="cm">multi-line</span> <span class="cm">JavaScript comment</span> <span class="cm">*/</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Lua">Lua</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=35" title="Edit section: Lua"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The <a href="/wiki/Lua_(programming_language)" title="Lua (programming language)">Lua</a> programming language uses double-hyphens, <code>--</code>, for single line comments in a similar way to <a href="/wiki/Ada_(programming_language)" title="Ada (programming language)">Ada</a>, <a href="/wiki/Eiffel_(programming_language)" title="Eiffel (programming language)">Eiffel</a>, <a href="/wiki/Haskell_(programming_language)" class="mw-redirect" title="Haskell (programming language)">Haskell</a>, <a href="/wiki/SQL" title="SQL">SQL</a> and <a href="/wiki/VHDL" title="VHDL">VHDL</a> languages. Lua also has block comments, which start with <code>--[[</code> and run until a closing <code>]]</code> </p><p>For example: </p> <div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="cm">--[[A multi-line</span> <span class="cm">long comment</span> <span class="cm">]]</span> <span class="nb">print</span><span class="p">(</span><span class="mi">20</span><span class="p">)</span> <span class="c1">-- print the result</span> </pre></div> <p>A common technique to comment out a piece of code,<sup id="cite_ref-44" class="reference"><a href="#cite_note-44"><span class="cite-bracket">&#91;</span>44<span class="cite-bracket">&#93;</span></a></sup> is to enclose the code between <code>--[[</code> and <code>--]]</code>, as below: </p> <div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="cm">--[[</span> <span class="cm">print(10)</span> <span class="cm">--]]</span> <span class="c1">-- no action (commented out)</span> </pre></div> <p>In this case, it's possible to reactivate the code by adding a single hyphen to the first line: </p> <div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">---[[</span> <span class="nb">print</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span> <span class="c1">--]]</span> <span class="c1">--&gt; 10</span> </pre></div> <p>In the first example, the <code>--[[</code> in the first line starts a long comment, and the two hyphens in the last line are still inside that comment. In the second example, the sequence <code>---[[</code> starts an ordinary, single-line comment, so that the first and the last lines become independent comments. In this case, the <code>print</code> is outside comments. In this case, the last line becomes an independent comment, as it starts with <code>--</code>. </p><p>Long comments in Lua can be more complex than these, as you can read in the section called "Long strings" c.f. <i>Programming in Lua</i>. </p> <div class="mw-heading mw-heading4"><h4 id="MATLAB">MATLAB</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=36" title="Edit section: MATLAB"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In <a href="/wiki/MATLAB" title="MATLAB">MATLAB</a>'s programming language, the '%' character indicates a single-line comment. Multi line comments are also available via&#160;%{ and&#160;%} brackets and can be nested, e.g. </p> <div class="mw-highlight mw-highlight-lang-matlab mw-content-ltr" dir="ltr"><pre><span></span><span class="c">% These are the derivatives for each term</span> <span class="n">d</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="p">[</span><span class="mi">0</span><span class="w"> </span><span class="o">-</span><span class="mi">1</span><span class="w"> </span><span class="mi">0</span><span class="p">];</span> <span class="cm">%{</span> <span class="cm"> &#160;%{</span> <span class="cm"> (Example of a nested comment, indentation is for cosmetics (and ignored).)</span> <span class="cm"> &#160;%}</span> <span class="w"> </span><span class="n">We</span><span class="w"> </span><span class="n">form</span><span class="w"> </span><span class="n">the</span><span class="w"> </span><span class="n">sequence</span><span class="p">,</span><span class="w"> </span><span class="n">following</span><span class="w"> </span><span class="n">the</span><span class="w"> </span><span class="n">Taylor</span><span class="w"> </span><span class="n">formula</span><span class="p">.</span> <span class="w"> </span><span class="n">Note</span><span class="w"> </span><span class="n">that</span><span class="w"> </span><span class="n">we</span><span class="o">&#39;</span><span class="n">re</span><span class="w"> </span><span class="n">operating</span><span class="w"> </span><span class="n">on</span><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="n">vector</span><span class="p">.</span> <span class="c">%}</span> <span class="n">seq</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="n">d</span><span class="w"> </span><span class="o">.*</span><span class="w"> </span><span class="p">(</span><span class="n">x</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">c</span><span class="p">)</span><span class="o">.^</span><span class="n">n</span><span class="w"> </span><span class="o">./</span><span class="p">(</span><span class="nb">factorial</span><span class="p">(</span><span class="n">n</span><span class="p">))</span> <span class="c">% We add-up to get the Taylor approximation</span> <span class="n">approx</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="nb">sum</span><span class="p">(</span><span class="n">seq</span><span class="p">)</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Nim">Nim</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=37" title="Edit section: Nim"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Nim_(programming_language)" title="Nim (programming language)">Nim</a> uses the '#' character for inline comments. Multi-line block comments are opened with '#[' and closed with ']#'. Multi-line block comments can be nested. </p><p>Nim also has documentation comments that use mixed <a href="/wiki/Markdown" title="Markdown">Markdown</a> and <a href="/wiki/ReStructuredText" title="ReStructuredText">ReStructuredText</a> markups. The inline documentation comments use '##' and multi-line block documentation comments are opened with '##[' and closed with ']##'. The compiler can generate <a href="/wiki/HTML" title="HTML">HTML</a>, <a href="/wiki/LaTeX" title="LaTeX">LaTeX</a> and <a href="/wiki/JSON" title="JSON">JSON</a> documentation from the documentation comments. Documentation comments are part of the <a href="/wiki/Abstract_syntax_tree" title="Abstract syntax tree">abstract syntax tree</a> and can be extracted using macros.<sup id="cite_ref-45" class="reference"><a href="#cite_note-45"><span class="cite-bracket">&#91;</span>45<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-highlight mw-highlight-lang-nim mw-content-ltr" dir="ltr"><pre><span></span><span class="sd">## Documentation of the module *ReSTructuredText* and **MarkDown**</span> <span class="c"># This is a comment, but it is not a documentation comment.</span> <span class="k">type</span><span class="w"> </span><span class="n">Kitten</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">object</span><span class="w"> </span><span class="sd">## Documentation of type</span> <span class="w"> </span><span class="n">age</span><span class="p">:</span><span class="w"> </span><span class="nb">int</span><span class="w"> </span><span class="sd">## Documentation of field</span> <span class="k">proc</span><span class="w"> </span><span class="nf">purr</span><span class="p">(</span><span class="n">self</span><span class="p">:</span><span class="w"> </span><span class="n">Kitten</span><span class="p">)</span><span class="w"> </span><span class="o">=</span> <span class="w"> </span><span class="sd">## Documentation of function</span> <span class="w"> </span><span class="n">echo</span><span class="w"> </span><span class="s">&quot;Purr Purr&quot;</span><span class="w"> </span><span class="c"># This is a comment, but it is not a documentation comment.</span> <span class="c"># This is a comment, but it is not a documentation comment.</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="OCaml">OCaml</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=38" title="Edit section: OCaml"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/OCaml" title="OCaml">OCaml</a> uses nestable comments, which is useful when commenting a code block. </p> <div class="mw-highlight mw-highlight-lang-ocaml mw-content-ltr" dir="ltr"><pre><span></span><span class="n">codeLine</span><span class="c">(* comment level 1(*comment level 2*)*)</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Pascal,_Delphi"><span id="Pascal.2C_Delphi"></span>Pascal, Delphi</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=39" title="Edit section: Pascal, Delphi"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In <a href="/wiki/Pascal_(programming_language)" title="Pascal (programming language)">Pascal</a> and <a href="/wiki/Delphi_(software)" title="Delphi (software)">Delphi</a>, comments are delimited by '{&#160;...&#160;}'. Comment lines can also start with '\\' . As an alternative, for computers that do not support these characters, '(*&#160;...&#160;*)' are allowed.<sup id="cite_ref-46" class="reference"><a href="#cite_note-46"><span class="cite-bracket">&#91;</span>46<span class="cite-bracket">&#93;</span></a></sup> </p><p>In <a href="/wiki/Niklaus_Wirth" title="Niklaus Wirth">Niklaus Wirth</a>'s more modern family of languages (including <a href="/wiki/Modula-2" title="Modula-2">Modula-2</a> and <a href="/wiki/Oberon_(programming_language)" title="Oberon (programming language)">Oberon</a>), comments are delimited by '(*&#160;...&#160;*)'.<sup id="cite_ref-47" class="reference"><a href="#cite_note-47"><span class="cite-bracket">&#91;</span>47<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-48" class="reference"><a href="#cite_note-48"><span class="cite-bracket">&#91;</span>48<span class="cite-bracket">&#93;</span></a></sup> </p><p>For example: </p> <div class="mw-highlight mw-highlight-lang-pascal mw-content-ltr" dir="ltr"><pre><span></span><span class="cm">(* test diagonals *)</span> <span class="n">columnDifference</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="n">testColumn</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">column</span><span class="o">;</span> <span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">row</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">columnDifference</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">testRow</span><span class="p">)</span><span class="w"> </span><span class="k">or</span> <span class="w"> </span><span class="o">.......</span> </pre></div> <p>Comments can be nested. // can be included in a {} and {} can be included in a (**). </p> <div class="mw-heading mw-heading4"><h4 id="Perl">Perl</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=40" title="Edit section: Perl"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Line comments in <a href="/wiki/Perl" title="Perl">Perl</a>, and many other <a href="/wiki/Scripting_language" title="Scripting language">scripting languages</a>, begin with a hash (#) symbol. </p> <div class="mw-highlight mw-highlight-lang-perl mw-content-ltr" dir="ltr"><pre><span></span><span class="c1"># A simple example</span> <span class="c1"># </span> <span class="k">my</span><span class="w"> </span><span class="nv">$s</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;Wikipedia&quot;</span><span class="p">;</span><span class="w"> </span><span class="c1"># Sets the variable s to &quot;Wikipedia&quot;.</span> <span class="k">print</span><span class="w"> </span><span class="nv">$s</span><span class="w"> </span><span class="o">.</span><span class="w"> </span><span class="s">&quot;\n&quot;</span><span class="p">;</span><span class="w"> </span><span class="c1"># Add a newline character after printing</span> </pre></div> <p>Instead of a regular block commenting construct, Perl uses <a href="/wiki/Plain_Old_Documentation" title="Plain Old Documentation">Plain Old Documentation</a>, a markup language for <a href="/wiki/Literate_programming" title="Literate programming">literate programming</a>,<sup id="cite_ref-49" class="reference"><a href="#cite_note-49"><span class="cite-bracket">&#91;</span>49<span class="cite-bracket">&#93;</span></a></sup> for instance:<sup id="cite_ref-50" class="reference"><a href="#cite_note-50"><span class="cite-bracket">&#91;</span>50<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-highlight mw-highlight-lang-perl mw-content-ltr" dir="ltr"><pre><span></span><span class="cm">=item Pod::List-E&lt;gt&gt;new()</span> <span class="cm">Create a new list object. Properties may be specified through a hash</span> <span class="cm">reference like this:</span> <span class="cm"> my $list = Pod::List-&gt;new({ -start =&gt; $., -indent =&gt; 4 });</span> <span class="cm">See the individual methods/properties for details.</span> <span class="cm">=cut</span> <span class="k">sub</span><span class="w"> </span><span class="nf">new</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">my</span><span class="w"> </span><span class="nv">$this</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">shift</span><span class="p">;</span> <span class="w"> </span><span class="k">my</span><span class="w"> </span><span class="nv">$class</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">ref</span><span class="p">(</span><span class="nv">$this</span><span class="p">)</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="nv">$this</span><span class="p">;</span> <span class="w"> </span><span class="k">my</span><span class="w"> </span><span class="nv">%params</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">@_</span><span class="p">;</span> <span class="w"> </span><span class="k">my</span><span class="w"> </span><span class="nv">$self</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="nv">%params</span><span class="p">};</span> <span class="w"> </span><span class="nb">bless</span><span class="w"> </span><span class="nv">$self</span><span class="p">,</span><span class="w"> </span><span class="nv">$class</span><span class="p">;</span> <span class="w"> </span><span class="nv">$self</span><span class="o">-&gt;</span><span class="n">initialize</span><span class="p">();</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nv">$self</span><span class="p">;</span> <span class="p">}</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="R">R</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=41" title="Edit section: R"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/R_(programming_language)" title="R (programming language)">R</a> only supports inline comments started by the hash (#) character. </p> <div class="mw-highlight mw-highlight-lang-r mw-content-ltr" dir="ltr"><pre><span></span><span class="c1"># This is a comment</span> <span class="nf">print</span><span class="p">(</span><span class="s">&quot;This is not a comment&quot;</span><span class="p">)</span><span class="w"> </span><span class="c1"># This is another comment</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Raku">Raku</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=42" title="Edit section: Raku"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Raku_(programming_language)" title="Raku (programming language)">Raku</a> (previously called Perl 6) uses the same line comments and POD Documentation comments as regular <a href="/wiki/Perl" title="Perl">Perl</a> (see Perl section above), but adds a configurable block comment type: "multi-line / embedded comments".<sup id="cite_ref-perl6_51-0" class="reference"><a href="#cite_note-perl6-51"><span class="cite-bracket">&#91;</span>51<span class="cite-bracket">&#93;</span></a></sup> </p><p>These start with a hash character, followed by a backtick, and then some opening bracketing character, and end with the matching closing bracketing character.<sup id="cite_ref-perl6_51-1" class="reference"><a href="#cite_note-perl6-51"><span class="cite-bracket">&#91;</span>51<span class="cite-bracket">&#93;</span></a></sup> The content can not only span multiple lines, but can also be embedded inline. </p> <div class="mw-highlight mw-highlight-lang-perl6 mw-content-ltr" dir="ltr"><pre><span></span><span class="cm">#`{{ &quot;commenting out&quot; this version </span> <span class="cm">toggle-case(Str:D $s)</span> <span class="cm">Toggles the case of each character in a string:</span> <span class="cm"> my Str $toggled-string = toggle-case(&quot;mY NAME IS mICHAEL!&quot;);</span> <span class="cm">}}</span> <span class="k">sub</span> <span class="n">toggle-case</span>(<span class="nb">Str:D</span> <span class="nv">$s</span>) <span class="cm">#`( this version of parens is used now )</span>{ ... } </pre></div> <div class="mw-heading mw-heading4"><h4 id="PHP">PHP</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=43" title="Edit section: PHP"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Comments in <a href="/wiki/PHP" title="PHP">PHP</a> can be either in C++ style (both inline and block), or use hashes. <a href="/wiki/PHPDoc" title="PHPDoc">PHPDoc</a> is a style adapted from Javadoc and is a common standard for documenting PHP code. </p><p>Starting in PHP 8, the # sign can only mean a comment if it's not immediately followed by '['. Otherwise, it will mean a function attribute, which runs until ']': </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="sd">/**</span> <span class="sd"> * This class contains a sample documentation.</span> <span class="sd"> * </span> <span class="sd"> * @author Unknown</span> <span class="sd"> */</span> <span class="p">#[</span><span class="nd">Attribute</span><span class="p">]</span> <span class="k">class</span> <span class="nc">MyAttribute</span> <span class="p">{</span> <span class="k">const</span> <span class="no">VALUE</span> <span class="o">=</span> <span class="s1">&#39;value&#39;</span><span class="p">;</span> <span class="c1">// This is an inline comment. It starts with &#39;//&#39;, like in C++.</span> <span class="k">private</span> <span class="nv">$value</span><span class="p">;</span> <span class="c1"># This is a Unix-style inline comment, which starts with &#39;#&#39;.</span> <span class="k">public</span> <span class="k">function</span> <span class="fm">__construct</span><span class="p">(</span><span class="nv">$value</span> <span class="o">=</span> <span class="k">null</span><span class="p">)</span> <span class="p">{</span> <span class="nv">$this</span><span class="o">-&gt;</span><span class="na">value</span> <span class="o">=</span> <span class="nv">$value</span><span class="p">;</span> <span class="p">}</span> <span class="cm">/*</span> <span class="cm"> This is a multiline comment.</span> <span class="cm"> These comments cannot be nested.</span> <span class="cm"> */</span> <span class="p">}</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="PowerShell">PowerShell</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=44" title="Edit section: PowerShell"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Comments in <a href="/wiki/Windows_PowerShell" class="mw-redirect" title="Windows PowerShell">Windows PowerShell</a> </p> <div class="mw-highlight mw-highlight-lang-powershell mw-content-ltr" dir="ltr"><pre><span></span><span class="c"># Single line comment</span> <span class="nb">Write-Host</span> <span class="s2">&quot;Hello, World!&quot;</span> <span class="cm">&lt;# Multi</span> <span class="cm"> Line</span> <span class="cm"> Comment #&gt;</span> <span class="nb">Write-Host</span> <span class="s2">&quot;Goodbye, world!&quot;</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Python">Python</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=45" title="Edit section: Python"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Inline comments in <a href="/wiki/Python_(programming_language)" title="Python (programming language)">Python</a> use the hash (#) character, as in the two examples in this code: </p> <div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span></span><span class="c1"># This program prints &quot;Hello World&quot; to the screen</span> <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Hello World!&quot;</span><span class="p">)</span> <span class="c1"># Note the new syntax</span> </pre></div> <p>Block comments, as defined in this article, do not technically exist in Python.<sup id="cite_ref-triple_52-0" class="reference"><a href="#cite_note-triple-52"><span class="cite-bracket">&#91;</span>52<span class="cite-bracket">&#93;</span></a></sup> A bare <a href="/wiki/String_literal" title="String literal">string literal</a> represented by a triple-quoted string can be used,<sup id="cite_ref-53" class="reference"><a href="#cite_note-53"><span class="cite-bracket">&#91;</span>53<span class="cite-bracket">&#93;</span></a></sup> but is not ignored by the interpreter in the same way that "#" comment is.<sup id="cite_ref-triple_52-1" class="reference"><a href="#cite_note-triple-52"><span class="cite-bracket">&#91;</span>52<span class="cite-bracket">&#93;</span></a></sup> In the examples below, the triple double-quoted strings act in this way as comments, but are also treated as <a href="/wiki/Docstring" title="Docstring">docstrings</a>: </p> <div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span></span><span class="sd">&quot;&quot;&quot;</span> <span class="sd">Assuming this is file mymodule.py, then this string, being the</span> <span class="sd">first statement in the file, will become the &quot;mymodule&quot; module&#39;s</span> <span class="sd">docstring when the file is imported.</span> <span class="sd">&quot;&quot;&quot;</span> <span class="k">class</span> <span class="nc">MyClass</span><span class="p">:</span> <span class="w"> </span><span class="sd">&quot;&quot;&quot;The class&#39;s docstring&quot;&quot;&quot;</span> <span class="k">def</span> <span class="nf">my_method</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> <span class="w"> </span><span class="sd">&quot;&quot;&quot;The method&#39;s docstring&quot;&quot;&quot;</span> <span class="k">def</span> <span class="nf">my_function</span><span class="p">():</span> <span class="w"> </span><span class="sd">&quot;&quot;&quot;The function&#39;s docstring&quot;&quot;&quot;</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Ruby">Ruby</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=46" title="Edit section: Ruby"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Inline comments in <a href="/wiki/Ruby_(programming_language)" title="Ruby (programming language)">Ruby</a> start with the # character. </p><p>To create a multiline comment, one must place "=begin" at the start of a line, and then everything until "=end" that starts a line is ignored. Including a space after the equals sign in this case throws a syntax error. </p> <div class="mw-highlight mw-highlight-lang-ruby mw-content-ltr" dir="ltr"><pre><span></span><span class="nb">puts</span><span class="w"> </span><span class="s2">&quot;This is not a comment&quot;</span> <span class="c1"># this is a comment</span> <span class="nb">puts</span><span class="w"> </span><span class="s2">&quot;This is not a comment&quot;</span> <span class="cm">=begin</span> <span class="cm">whatever goes in these lines</span> <span class="cm">is just for the human reader</span> <span class="cm">=end</span> <span class="nb">puts</span><span class="w"> </span><span class="s2">&quot;This is not a comment&quot;</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="SQL">SQL</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=47" title="Edit section: SQL"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Standard comments in SQL are in single-line-only form, using two dashes: </p> <div class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">-- This is a single line comment</span> <span class="c1">-- followed by a second line</span> <span class="k">SELECT</span><span class="w"> </span><span class="k">COUNT</span><span class="p">(</span><span class="o">*</span><span class="p">)</span> <span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">Authors</span> <span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">Authors</span><span class="p">.</span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">&#39;Smith&#39;</span><span class="p">;</span><span class="w"> </span><span class="c1">-- Note: we only want &#39;smith&#39;</span> <span class="w"> </span><span class="c1">-- this comment appears after SQL code</span> </pre></div> <p>Alternatively, a comment format syntax identical to the "block comment" style used in the syntax for C and Java is supported by <a href="/wiki/Transact-SQL" title="Transact-SQL">Transact-SQL</a>, <a href="/wiki/MySQL" title="MySQL">MySQL</a>, <a href="/wiki/SQLite" title="SQLite">SQLite</a>, <a href="/wiki/PostgreSQL" title="PostgreSQL">PostgreSQL</a>, and <a href="/wiki/Oracle_Database" title="Oracle Database">Oracle</a>.<sup id="cite_ref-MSSQL_54-0" class="reference"><a href="#cite_note-MSSQL-54"><span class="cite-bracket">&#91;</span>54<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-MySQL_55-0" class="reference"><a href="#cite_note-MySQL-55"><span class="cite-bracket">&#91;</span>55<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-SQLite_56-0" class="reference"><a href="#cite_note-SQLite-56"><span class="cite-bracket">&#91;</span>56<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-PostgreSQL_57-0" class="reference"><a href="#cite_note-PostgreSQL-57"><span class="cite-bracket">&#91;</span>57<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-Oracle_58-0" class="reference"><a href="#cite_note-Oracle-58"><span class="cite-bracket">&#91;</span>58<span class="cite-bracket">&#93;</span></a></sup> </p><p>MySQL also supports comments from the hash (#) character to the end of the line. </p> <div class="mw-heading mw-heading4"><h4 id="Swift">Swift</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=48" title="Edit section: Swift"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div><p> Single-line comments begin with two forward-slashes (//):</p><div class="mw-highlight mw-highlight-lang-swift mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">// This is a comment.</span> </pre></div><p>Multiline comments start with a forward-slash followed by an asterisk (/*) and end with an asterisk followed by a forward-slash (*/):</p><div class="mw-highlight mw-highlight-lang-swift mw-content-ltr" dir="ltr"><pre><span></span><span class="cm">/* This is also a comment</span> <span class="cm"> but is written over multiple lines. */</span> </pre></div><p>Multiline comments in Swift can be nested inside other multiline comments. You write nested comments by starting a multiline comment block and then starting a second multiline comment within the first block. The second block is then closed, followed by the first block:</p><div class="mw-highlight mw-highlight-lang-swift mw-content-ltr" dir="ltr"><pre><span></span><span class="cm">/* This is the start of the first multiline comment.</span> <span class="cm"> /* This is the second, nested multiline comment. */</span> <span class="cm"> This is the end of the first multiline comment. */</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="XML_(or_HTML)"><span id="XML_.28or_HTML.29"></span>XML (or HTML)</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=49" title="Edit section: XML (or HTML)"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div><p> Comments in <a href="/wiki/XML" title="XML">XML</a> (or HTML) are introduced with </p><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="err">&lt;</span>!-- </pre></div><p> and can spread over several lines until the terminator, </p><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span>--&gt; </pre></div> <p>For example, </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="cm">&lt;!-- select the context here --&gt;</span> <span class="nt">&lt;param</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;context&quot;</span><span class="w"> </span><span class="na">value=</span><span class="s">&quot;public&quot;</span><span class="w"> </span><span class="nt">/&gt;</span> </pre></div> <p>For compatibility with <a href="/wiki/SGML" class="mw-redirect" title="SGML">SGML</a>, the string "--" (double-hyphen) is not allowed inside comments. </p> <div class="mw-heading mw-heading2"><h2 id="Security_issues">Security issues</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=50" title="Edit section: Security issues"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In <a href="/wiki/Interpreted_language" class="mw-redirect" title="Interpreted language">interpreted languages</a> the comments are viewable to the end user of the program. In some cases, such as sections of code that are "commented out", this may present a security <a href="/wiki/Vulnerability_(computing)" class="mw-redirect" title="Vulnerability (computing)">vulnerability</a>.<sup id="cite_ref-InsecureComments_59-0" class="reference"><a href="#cite_note-InsecureComments-59"><span class="cite-bracket">&#91;</span>59<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=51" title="Edit section: See also"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/Docstring" title="Docstring">Docstring</a>, a specific type of comment that is parsed and retained throughout the runtime of the program.</li> <li><a href="/wiki/Shebang_(Unix)" title="Shebang (Unix)">Shebang</a>, the use of <i>#!</i> as an interpreter directive in scripts on Unix-like systems</li> <li><a href="/wiki/HTML_comment_tag" class="mw-redirect" title="HTML comment tag">HTML comment tag</a></li> <li><a href="/wiki/Literate_programming" title="Literate programming">Literate programming</a>, alternative documentation <a href="/wiki/Programming_paradigm" title="Programming paradigm">paradigm</a></li> <li><a href="/wiki/Comparison_of_programming_languages_(syntax)#Comments" title="Comparison of programming languages (syntax)">Syntax of comments</a> in various programming languages</li> <li><a href="/wiki/COMMENT_(CONFIG.SYS_directive)" class="mw-redirect" title="COMMENT (CONFIG.SYS directive)">COMMENT (CONFIG.SYS directive)</a></li> <li><a href="/wiki/REM_(CONFIG.SYS_directive)" class="mw-redirect" title="REM (CONFIG.SYS directive)">REM (CONFIG.SYS directive)</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="Notes_and_references">Notes and references</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=52" title="Edit section: Notes and references"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1239543626">.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist reflist-columns references-column-width reflist-columns-2"> <ol class="references"> <li id="cite_note-PennyGrubb000-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-PennyGrubb000_1-0">^</a></b></span> <span class="reference-text">Source code can be divided into <i>program code</i> (which consists of machine-translatable instructions); and <i>comments</i> (which include human-readable notes and other kinds of annotations in support of the program code).<style data-mw-deduplicate="TemplateStyles:r1238218222">.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}</style><cite id="CITEREFPenny_Grubb2003" class="citation book cs1">Penny Grubb, Armstrong Takang (2003). <i>Software Maintenance: Concepts and Practice</i>. World Scientific. pp.&#160;7, plese start120–121. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-981-238-426-3" title="Special:BookSources/978-981-238-426-3"><bdi>978-981-238-426-3</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Software+Maintenance%3A+Concepts+and+Practice&amp;rft.pages=7%2C+plese+start120-121&amp;rft.pub=World+Scientific&amp;rft.date=2003&amp;rft.isbn=978-981-238-426-3&amp;rft.aulast=Penny+Grubb&amp;rft.aufirst=Armstrong+Takang&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text">For purposes of this article, programming language comments are treated as indistinct from comments that appear in <a href="/wiki/Markup_language" title="Markup language">markup languages</a>, <a href="/wiki/Configuration_file" title="Configuration file">configuration files</a> and other similar contexts. Moreover, markup language is often closely integrated with programming language code, especially in the context of <a href="/wiki/Automatic_programming" title="Automatic programming">code generation</a>. See e.g., <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFGanguli2002" class="citation book cs1">Ganguli, Madhushree (2002). <i>Making Use of Jsp</i>. New York: Wiley. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-471-21974-3" title="Special:BookSources/978-0-471-21974-3"><bdi>978-0-471-21974-3</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Making+Use+of+Jsp&amp;rft.place=New+York&amp;rft.pub=Wiley&amp;rft.date=2002&amp;rft.isbn=978-0-471-21974-3&amp;rft.aulast=Ganguli&amp;rft.aufirst=Madhushree&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFHewitt2003" class="citation book cs1">Hewitt, Eben (2003). <i>Java for Coldfusion Developers</i>. Upper Saddle River: Pearson Education. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-13-046180-3" title="Special:BookSources/978-0-13-046180-3"><bdi>978-0-13-046180-3</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Java+for+Coldfusion+Developers&amp;rft.place=Upper+Saddle+River&amp;rft.pub=Pearson+Education&amp;rft.date=2003&amp;rft.isbn=978-0-13-046180-3&amp;rft.aulast=Hewitt&amp;rft.aufirst=Eben&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-JBDixit000-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-JBDixit000_3-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFDixit2003" class="citation book cs1">Dixit, J.B. (2003). <i>Computer Fundamentals and Programming in C</i>. Laxmi Publications. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-81-7008-882-0" title="Special:BookSources/978-81-7008-882-0"><bdi>978-81-7008-882-0</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Computer+Fundamentals+and+Programming+in+C&amp;rft.pub=Laxmi+Publications&amp;rft.date=2003&amp;rft.isbn=978-81-7008-882-0&amp;rft.aulast=Dixit&amp;rft.aufirst=J.B.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-Higham000-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-Higham000_4-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFHigham2005" class="citation book cs1">Higham, Desmond (2005). <i>MATLAB Guide</i>. SIAM. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-89871-578-1" title="Special:BookSources/978-0-89871-578-1"><bdi>978-0-89871-578-1</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=MATLAB+Guide&amp;rft.pub=SIAM&amp;rft.date=2005&amp;rft.isbn=978-0-89871-578-1&amp;rft.aulast=Higham&amp;rft.aufirst=Desmond&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-Vermeulen000-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-Vermeulen000_5-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFVermeulen2000" class="citation book cs1">Vermeulen, Al (2000). <a rel="nofollow" class="external text" href="https://archive.org/details/elementsofjavast00verm"><i>The Elements of Java Style</i></a>. Cambridge University Press. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-521-77768-1" title="Special:BookSources/978-0-521-77768-1"><bdi>978-0-521-77768-1</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=The+Elements+of+Java+Style&amp;rft.pub=Cambridge+University+Press&amp;rft.date=2000&amp;rft.isbn=978-0-521-77768-1&amp;rft.aulast=Vermeulen&amp;rft.aufirst=Al&amp;rft_id=https%3A%2F%2Farchive.org%2Fdetails%2Felementsofjavast00verm&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-javadude000-6"><span class="mw-cite-backlink">^ <a href="#cite_ref-javadude000_6-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-javadude000_6-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-javadude000_6-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://javadude.com/articles/comments.html">"Using the right comment in Java"</a>. 2000-03-04<span class="reference-accessdate">. Retrieved <span class="nowrap">2007-07-24</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Using+the+right+comment+in+Java&amp;rft.date=2000-03-04&amp;rft_id=http%3A%2F%2Fjavadude.com%2Farticles%2Fcomments.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-Dietrich000-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-Dietrich000_7-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFW._R.2003" class="citation book cs1">W. R., Dietrich (2003). <i>Applied Pattern Recognition: Algorithms and Implementation in C++</i>. Springer. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-3-528-35558-6" title="Special:BookSources/978-3-528-35558-6"><bdi>978-3-528-35558-6</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Applied+Pattern+Recognition%3A+Algorithms+and+Implementation+in+C%2B%2B&amp;rft.pub=Springer&amp;rft.date=2003&amp;rft.isbn=978-3-528-35558-6&amp;rft.aulast=W.+R.&amp;rft.aufirst=Dietrich&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span> offers viewpoints on proper use of comments in source code. p. 66.</span> </li> <li id="cite_note-Keyes000-8"><span class="mw-cite-backlink">^ <a href="#cite_ref-Keyes000_8-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Keyes000_8-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFKeyes2003" class="citation book cs1">Keyes, Jessica (2003). <i>Software Engineering Handbook</i>. CRC Press. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-8493-1479-7" title="Special:BookSources/978-0-8493-1479-7"><bdi>978-0-8493-1479-7</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Software+Engineering+Handbook&amp;rft.pub=CRC+Press&amp;rft.date=2003&amp;rft.isbn=978-0-8493-1479-7&amp;rft.aulast=Keyes&amp;rft.aufirst=Jessica&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span> discusses comments and the "Science of Documentation" p. 256.</span> </li> <li id="cite_note-BadComment000-9"><span class="mw-cite-backlink">^ <a href="#cite_ref-BadComment000_9-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-BadComment000_9-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-BadComment000_9-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><i><a href="/wiki/The_Elements_of_Programming_Style_(book)" class="mw-redirect" title="The Elements of Programming Style (book)">The Elements of Programming Style</a></i>, <a href="/wiki/Brian_Kernighan" title="Brian Kernighan">Kernighan</a> &amp; <a href="/wiki/P._J._Plauger" title="P. J. Plauger">Plauger</a></span> </li> <li id="cite_note-GoodComment000-10"><span class="mw-cite-backlink">^ <a href="#cite_ref-GoodComment000_10-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-GoodComment000_10-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><i><a href="/wiki/Code_Complete" title="Code Complete">Code Complete</a></i>, <a href="/wiki/Steve_McConnell" title="Steve McConnell">McConnell</a></span> </li> <li id="cite_note-AlgoComments-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-AlgoComments_11-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFSpinellis2003" class="citation book cs1">Spinellis, Diomidis (2003). <i>Code reading: The Open Source Perspective</i>. Addison-Wesley. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-201-79940-8" title="Special:BookSources/978-0-201-79940-8"><bdi>978-0-201-79940-8</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Code+reading%3A+The+Open+Source+Perspective&amp;rft.pub=Addison-Wesley&amp;rft.date=2003&amp;rft.isbn=978-0-201-79940-8&amp;rft.aulast=Spinellis&amp;rft.aufirst=Diomidis&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-asciiart000-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-asciiart000_12-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20070714092702/http://www.codeproject.com/macro/codeplotter.asp">"CodePlotter 1.6 – Add and edit diagrams in your code with this 'Visio-like' tool"</a>. Archived from <a rel="nofollow" class="external text" href="http://www.codeproject.com/macro/codeplotter.asp">the original</a> on 2007-07-14<span class="reference-accessdate">. Retrieved <span class="nowrap">2007-07-24</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=CodePlotter+1.6+%E2%80%93+Add+and+edit+diagrams+in+your+code+with+this+%27Visio-like%27+tool&amp;rft_id=http%3A%2F%2Fwww.codeproject.com%2Fmacro%2Fcodeplotter.asp&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-Niederst000-13"><span class="mw-cite-backlink">^ <a href="#cite_ref-Niederst000_13-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Niederst000_13-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFNiederst2006" class="citation book cs1">Niederst, Jennifer (2006). <i>Web Design in a Nutshell: A Desktop Quick Reference</i>. O'Reilly. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-596-00987-8" title="Special:BookSources/978-0-596-00987-8"><bdi>978-0-596-00987-8</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Web+Design+in+a+Nutshell%3A+A+Desktop+Quick+Reference&amp;rft.pub=O%27Reilly&amp;rft.date=2006&amp;rft.isbn=978-0-596-00987-8&amp;rft.aulast=Niederst&amp;rft.aufirst=Jennifer&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span>Sometimes the difference between a "comment" and other syntax elements of a programming or markup language entails subtle nuances. Niederst indicates one such situation by stating: "Unfortunately, XML software thinks of comments as unimportant information and may simply remove the comments from a document before processing it. To avoid this problem, use an XML CDATA section instead."</span> </li> <li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text">See e.g., <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFWynne-Powell2008" class="citation book cs1">Wynne-Powell, Rod (2008). <a rel="nofollow" class="external text" href="https://archive.org/details/macosxforphotogr0000wynn"><i>Mac OS X for Photographers: Optimized Image Workflow for the Mac User</i></a>. Oxford: Focal Press. p.&#160;243. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-240-52027-8" title="Special:BookSources/978-0-240-52027-8"><bdi>978-0-240-52027-8</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Mac+OS+X+for+Photographers%3A+Optimized+Image+Workflow+for+the+Mac+User&amp;rft.place=Oxford&amp;rft.pages=243&amp;rft.pub=Focal+Press&amp;rft.date=2008&amp;rft.isbn=978-0-240-52027-8&amp;rft.aulast=Wynne-Powell&amp;rft.aufirst=Rod&amp;rft_id=https%3A%2F%2Farchive.org%2Fdetails%2Fmacosxforphotogr0000wynn&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFLamb1998" class="citation book cs1">Lamb, Linda (1998). <a rel="nofollow" class="external text" href="https://archive.org/details/learningvieditor00lamb"><i>Learning the VI Editor</i></a>. Sebastopol: O'Reilly &amp; Associates. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-1-56592-426-0" title="Special:BookSources/978-1-56592-426-0"><bdi>978-1-56592-426-0</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Learning+the+VI+Editor&amp;rft.place=Sebastopol&amp;rft.pub=O%27Reilly+%26+Associates&amp;rft.date=1998&amp;rft.isbn=978-1-56592-426-0&amp;rft.aulast=Lamb&amp;rft.aufirst=Linda&amp;rft_id=https%3A%2F%2Farchive.org%2Fdetails%2Flearningvieditor00lamb&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span> describes the use of modeline syntax in Vim configuration files.</span> </li> <li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text">See e.g., <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFBerlin2006" class="citation book cs1">Berlin, Daniel (2006). <i>Practical Subversion, Second Edition</i>. Berkeley: APress. p.&#160;168. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-1-59059-753-8" title="Special:BookSources/978-1-59059-753-8"><bdi>978-1-59059-753-8</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Practical+Subversion%2C+Second+Edition&amp;rft.place=Berkeley&amp;rft.pages=168&amp;rft.pub=APress&amp;rft.date=2006&amp;rft.isbn=978-1-59059-753-8&amp;rft.aulast=Berlin&amp;rft.aufirst=Daniel&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-Ambler000-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-Ambler000_17-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFAmbler2004" class="citation book cs1">Ambler, Scott (2004). <i>The Object Primer: Agile Model-Driven Development with UML 2.0</i>. Cambridge University Press. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-1-397-80521-8" title="Special:BookSources/978-1-397-80521-8"><bdi>978-1-397-80521-8</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=The+Object+Primer%3A+Agile+Model-Driven+Development+with+UML+2.0&amp;rft.pub=Cambridge+University+Press&amp;rft.date=2004&amp;rft.isbn=978-1-397-80521-8&amp;rft.aulast=Ambler&amp;rft.aufirst=Scott&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/defn">Function definition with docstring in Clojure</a></span> </li> <li id="cite_note-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-19">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFMurach" class="citation book cs1">Murach. <i>C# 2005</i>. p.&#160;56.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=C%23+2005&amp;rft.pages=56&amp;rft.au=Murach&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-20">^</a></b></span> <span class="reference-text"><a href="https://wiki.c2.com/?HotComments" class="extiw" title="c2:HotComments">c2: HotComments</a></span> </li> <li id="cite_note-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-21">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.ruby-lang.org/en/2.4.0/Encoding.html">"class Encoding"</a>. <i>Ruby</i>. ruby-lang.org<span class="reference-accessdate">. Retrieved <span class="nowrap">5 December</span> 2018</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Ruby&amp;rft.atitle=class+Encoding&amp;rft_id=https%3A%2F%2Fdocs.ruby-lang.org%2Fen%2F2.4.0%2FEncoding.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-22">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.python.org/dev/peps/pep-0263/">"PEP 263 – Defining Python Source Code Encodings"</a>. Python.org<span class="reference-accessdate">. Retrieved <span class="nowrap">5 December</span> 2018</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=PEP+263+%E2%80%93+Defining+Python+Source+Code+Encodings&amp;rft.pub=Python.org&amp;rft_id=https%3A%2F%2Fwww.python.org%2Fdev%2Fpeps%2Fpep-0263%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-23"><span class="mw-cite-backlink"><b><a href="#cite_ref-23">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFPolacek2017" class="citation web cs1">Polacek, Marek (2017-03-10). <a rel="nofollow" class="external text" href="https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/">"-Wimplicit-fallthrough in GCC 7"</a>. <i>Red Hat Developer</i>. Red Hat<span class="reference-accessdate">. Retrieved <span class="nowrap">10 February</span> 2019</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Red+Hat+Developer&amp;rft.atitle=-Wimplicit-fallthrough+in+GCC+7&amp;rft.date=2017-03-10&amp;rft.aulast=Polacek&amp;rft.aufirst=Marek&amp;rft_id=https%3A%2F%2Fdevelopers.redhat.com%2Fblog%2F2017%2F03%2F10%2Fwimplicit-fallthrough-in-gcc-7%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-24"><span class="mw-cite-backlink"><b><a href="#cite_ref-24">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFLisa_Eadicicco2014" class="citation web cs1">Lisa Eadicicco (27 March 2014). <a rel="nofollow" class="external text" href="https://www.businessinsider.com/microsoft-hidden-messages-in-word-and-ms-dos-2014-3?r=US&amp;IR=T">"Microsoft Programmers Hid A Bunch Of Profanity In Early Software Code"</a>. <i><a href="/wiki/Business_Insider_Australia" class="mw-redirect" title="Business Insider Australia">Business Insider Australia</a></i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20161229170544/http://www.businessinsider.com.au/microsoft-hidden-messages-in-word-and-ms-dos-2014-3?r=US&amp;IR=T">Archived</a> from the original on 29 December 2016.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Business+Insider+Australia&amp;rft.atitle=Microsoft+Programmers+Hid+A+Bunch+Of+Profanity+In+Early+Software+Code&amp;rft.date=2014-03-27&amp;rft.au=Lisa+Eadicicco&amp;rft_id=https%3A%2F%2Fwww.businessinsider.com%2Fmicrosoft-hidden-messages-in-word-and-ms-dos-2014-3%3Fr%3DUS%26IR%3DT&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-SwearWords-25"><span class="mw-cite-backlink"><b><a href="#cite_ref-SwearWords_25-0">^</a></b></span> <span class="reference-text">(see e.g., <a rel="nofollow" class="external text" href="http://www.vidarholen.net/contents/wordcount/">Linux Swear Count</a>).</span> </li> <li id="cite_note-26"><span class="mw-cite-backlink"><b><a href="#cite_ref-26">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFGoodliffe2006" class="citation book cs1">Goodliffe, Pete (2006). <i>Code Craft</i>. San Francisco: No Starch Press. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-1-59327-119-0" title="Special:BookSources/978-1-59327-119-0"><bdi>978-1-59327-119-0</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Code+Craft&amp;rft.place=San+Francisco&amp;rft.pub=No+Starch+Press&amp;rft.date=2006&amp;rft.isbn=978-1-59327-119-0&amp;rft.aulast=Goodliffe&amp;rft.aufirst=Pete&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-27"><span class="mw-cite-backlink"><b><a href="#cite_ref-27">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFSmith1991" class="citation book cs1">Smith, T. (1991). <i>Intermediate Programming Principles and Techniques Using Pascal</i>. Belmont: West Pub. Co. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-314-66314-6" title="Special:BookSources/978-0-314-66314-6"><bdi>978-0-314-66314-6</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Intermediate+Programming+Principles+and+Techniques+Using+Pascal&amp;rft.place=Belmont&amp;rft.pub=West+Pub.+Co&amp;rft.date=1991&amp;rft.isbn=978-0-314-66314-6&amp;rft.aulast=Smith&amp;rft.aufirst=T.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-28"><span class="mw-cite-backlink"><b><a href="#cite_ref-28">^</a></b></span> <span class="reference-text">See e.g., <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFKoletzke2000" class="citation book cs1">Koletzke, Peter (2000). <i>Oracle Developer Advanced Forms &amp; Reports</i>. Berkeley: Osborne/McGraw-Hill. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-07-212048-6" title="Special:BookSources/978-0-07-212048-6"><bdi>978-0-07-212048-6</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Oracle+Developer+Advanced+Forms+%26+Reports&amp;rft.place=Berkeley&amp;rft.pub=Osborne%2FMcGraw-Hill&amp;rft.date=2000&amp;rft.isbn=978-0-07-212048-6&amp;rft.aulast=Koletzke&amp;rft.aufirst=Peter&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span> page 65.</span> </li> <li id="cite_note-BadComments001-29"><span class="mw-cite-backlink"><b><a href="#cite_ref-BadComments001_29-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.sqlservercentral.com/columnists/awarren/worstpracticebadcomments.asp">"Worst Practice - Bad Comments"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2007-07-24</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Worst+Practice+-+Bad+Comments&amp;rft_id=http%3A%2F%2Fwww.sqlservercentral.com%2Fcolumnists%2Fawarren%2Fworstpracticebadcomments.asp&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-Morelli000-30"><span class="mw-cite-backlink"><b><a href="#cite_ref-Morelli000_30-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFMorelli2006" class="citation book cs1">Morelli, Ralph (2006). <i>Java, Java, Java: object-oriented problem solving</i>. Prentice Hall College. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-13-147434-5" title="Special:BookSources/978-0-13-147434-5"><bdi>978-0-13-147434-5</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Java%2C+Java%2C+Java%3A+object-oriented+problem+solving&amp;rft.pub=Prentice+Hall+College&amp;rft.date=2006&amp;rft.isbn=978-0-13-147434-5&amp;rft.aulast=Morelli&amp;rft.aufirst=Ralph&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-Javadoc000-31"><span class="mw-cite-backlink">^ <a href="#cite_ref-Javadoc000_31-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Javadoc000_31-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://java.sun.com/j2se/javadoc/writingdoccomments/">"How to Write Doc Comments for the Javadoc Tool"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2007-07-24</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=How+to+Write+Doc+Comments+for+the+Javadoc+Tool&amp;rft_id=http%3A%2F%2Fjava.sun.com%2Fj2se%2Fjavadoc%2Fwritingdoccomments%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span> Javadoc guidelines specify that comments are crucial to the platform. Further, the appropriate level of detail is fairly well-defined: "We spend time and effort focused on specifying boundary conditions, argument ranges and corner cases rather than defining common programming terms, writing conceptual overviews, and including examples for developers."</span> </li> <li id="cite_note-techniques001-32"><span class="mw-cite-backlink"><b><a href="#cite_ref-techniques001_32-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFYourdon2007" class="citation book cs1">Yourdon, Edward (2007). <i>Techniques of Program Structure and Design</i>. University of Michigan. 013901702X.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Techniques+of+Program+Structure+and+Design&amp;rft.pub=University+of+Michigan&amp;rft.date=2007&amp;rft.aulast=Yourdon&amp;rft.aufirst=Edward&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span>Non-existent comments can make it difficult to comprehend code, but comments may be detrimental if they are obsolete, redundant, incorrect or otherwise make it more difficult to comprehend the intended purpose for the source code.</span> </li> <li id="cite_note-CmmtPhilosophy-33"><span class="mw-cite-backlink"><b><a href="#cite_ref-CmmtPhilosophy_33-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFDewhurst2002" class="citation book cs1">Dewhurst, Stephen C (2002). <i>C++ Gotchas: Avoiding Common Problems in Coding and Design</i>. Addison-Wesley Professional. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-321-12518-7" title="Special:BookSources/978-0-321-12518-7"><bdi>978-0-321-12518-7</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=C%2B%2B+Gotchas%3A+Avoiding+Common+Problems+in+Coding+and+Design&amp;rft.pub=Addison-Wesley+Professional&amp;rft.date=2002&amp;rft.isbn=978-0-321-12518-7&amp;rft.aulast=Dewhurst&amp;rft.aufirst=Stephen+C&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-gnome000-34"><span class="mw-cite-backlink"><b><a href="#cite_ref-gnome000_34-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20070808173421/http://developer.gnome.org/doc/guides/programming-guidelines/code-style.html">"Coding Style"</a>. Archived from <a rel="nofollow" class="external text" href="http://developer.gnome.org/doc/guides/programming-guidelines/code-style.html">the original</a> on 2007-08-08<span class="reference-accessdate">. Retrieved <span class="nowrap">2007-07-24</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Coding+Style&amp;rft_id=http%3A%2F%2Fdeveloper.gnome.org%2Fdoc%2Fguides%2Fprogramming-guidelines%2Fcode-style.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-Holub000-35"><span class="mw-cite-backlink"><b><a href="#cite_ref-Holub000_35-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20070720153845/http://www.holub.com/company/allen_holub.html">"Allen Holub"</a>. Archived from <a rel="nofollow" class="external text" href="http://www.holub.com/company/allen_holub.html">the original</a> on 2007-07-20<span class="reference-accessdate">. Retrieved <span class="nowrap">2007-07-24</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Allen+Holub&amp;rft_id=http%3A%2F%2Fwww.holub.com%2Fcompany%2Fallen_holub.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-Holub001-36"><span class="mw-cite-backlink"><b><a href="#cite_ref-Holub001_36-0">^</a></b></span> <span class="reference-text">Allen Holub, <i>Enough Rope to Shoot Yourself in the Foot</i>, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-07-029689-8" title="Special:BookSources/0-07-029689-8">0-07-029689-8</a>, 1995, McGraw-Hill</span> </li> <li id="cite_note-Thompson1972-37"><span class="mw-cite-backlink"><b><a href="#cite_ref-Thompson1972_37-0">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFKen_Thompson" class="citation web cs1">Ken Thompson. <a rel="nofollow" class="external text" href="https://www.bell-labs.com/usr/dmr/www/kbman.html">"Users' Reference to B"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2017-07-21</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Users%27+Reference+to+B&amp;rft.au=Ken+Thompson&amp;rft_id=https%3A%2F%2Fwww.bell-labs.com%2Fusr%2Fdmr%2Fwww%2Fkbman.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-38"><span class="mw-cite-backlink"><b><a href="#cite_ref-38">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="https://www.python.org/dev/peps/pep-0350/#what-are-codetags">"PEP 0350 – Codetags"</a>, Python Software Foundation</span> </li> <li id="cite_note-39"><span class="mw-cite-backlink"><b><a href="#cite_ref-39">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="https://medium.com/@eido.askayo/never-forget-anything-before-after-and-while-coding-98d187ae4cf1">"Never Forget Anything Before, After and While Coding"</a>, Using "codetag" comments as productive remainders</span> </li> <li id="cite_note-40"><span class="mw-cite-backlink"><b><a href="#cite_ref-40">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="https://msdn.microsoft.com/en-us/library/txtwdysk.aspx#tokenscomments">"Using the Task List"</a>, msdn.microsoft.com</span> </li> <li id="cite_note-41"><span class="mw-cite-backlink"><b><a href="#cite_ref-41">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://learningnetwork.cisco.com/thread/71302">"Leave a comment in running-config"</a>. <i>Cisco Learning Network (discussion forum)</i>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Cisco+Learning+Network+%28discussion+forum%29&amp;rft.atitle=Leave+a+comment+in+running-config&amp;rft_id=https%3A%2F%2Flearningnetwork.cisco.com%2Fthread%2F71302&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-42"><span class="mw-cite-backlink"><b><a href="#cite_ref-42">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="GUID-657D5FD4-32C5-444C-BCE0-BC2CC1069005" class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/config-mgmt/configuration/xe-3s/asr903/config-mgmt-xe-3s-asr903-book/cm-config-files.html">"Managing Configuration Files Configuration Guide, Cisco IOS XE Release 3S (ASR 900 Series)"</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Managing+Configuration+Files+Configuration+Guide%2C+Cisco+IOS+XE+Release+3S+%28ASR+900+Series%29&amp;rft_id=http%3A%2F%2Fwww.cisco.com%2Fc%2Fen%2Fus%2Ftd%2Fdocs%2Fios-xml%2Fios%2Fconfig-mgmt%2Fconfiguration%2Fxe-3s%2Fasr903%2Fconfig-mgmt-xe-3s-asr903-book%2Fcm-config-files.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-43"><span class="mw-cite-backlink"><b><a href="#cite_ref-43">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.haskell.org/haskellwiki/Literate_programming#Bird_Style">"Literate programming"</a>. <i>haskell.org</i>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=haskell.org&amp;rft.atitle=Literate+programming&amp;rft_id=http%3A%2F%2Fwww.haskell.org%2Fhaskellwiki%2FLiterate_programming%23Bird_Style&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-44"><span class="mw-cite-backlink"><b><a href="#cite_ref-44">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.lua.org/pil/1.3.html">"Programming in Lua 1.3"</a>. <i>www.Lua.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2017-11-08</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=www.Lua.org&amp;rft.atitle=Programming+in+Lua+1.3&amp;rft_id=http%3A%2F%2Fwww.lua.org%2Fpil%2F1.3.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-45"><span class="mw-cite-backlink"><b><a href="#cite_ref-45">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="https://nim-lang.github.io/Nim/macros.html#extractDocCommentsAndRunnables%2CNimNode">macros.extractDocCommentsAndRunnables</a></span> </li> <li id="cite_note-46"><span class="mw-cite-backlink"><b><a href="#cite_ref-46">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFKathleen_Jensen,_Niklaus_Wirth1985" class="citation book cs1">Kathleen Jensen, Niklaus Wirth (1985). <i>Pascal User Manual and Report</i>. Springer-Verlag. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-387-96048-1" title="Special:BookSources/0-387-96048-1"><bdi>0-387-96048-1</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Pascal+User+Manual+and+Report&amp;rft.pub=Springer-Verlag&amp;rft.date=1985&amp;rft.isbn=0-387-96048-1&amp;rft.au=Kathleen+Jensen%2C+Niklaus+Wirth&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-47"><span class="mw-cite-backlink"><b><a href="#cite_ref-47">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFNiklaus_Wirth1983" class="citation book cs1">Niklaus Wirth (1983). <i>Programming in Modula-2</i>. Springer-Verlag. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-387-15078-1" title="Special:BookSources/0-387-15078-1"><bdi>0-387-15078-1</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Programming+in+Modula-2&amp;rft.pub=Springer-Verlag&amp;rft.date=1983&amp;rft.isbn=0-387-15078-1&amp;rft.au=Niklaus+Wirth&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-48"><span class="mw-cite-backlink"><b><a href="#cite_ref-48">^</a></b></span> <span class="reference-text">*<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFMartin_Reiser,_Niklaus_Wirth1992" class="citation book cs1">Martin Reiser, Niklaus Wirth (1992). <i>Programming in Oberon</i>. Addison-Wesley. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-201-56543-9" title="Special:BookSources/0-201-56543-9"><bdi>0-201-56543-9</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Programming+in+Oberon&amp;rft.pub=Addison-Wesley&amp;rft.date=1992&amp;rft.isbn=0-201-56543-9&amp;rft.au=Martin+Reiser%2C+Niklaus+Wirth&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-49"><span class="mw-cite-backlink"><b><a href="#cite_ref-49">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://perldoc.perl.org/perlpod.html">"perlpod – the Plain Old Documentation format"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2011-09-12</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=perlpod+%E2%80%93+the+Plain+Old+Documentation+format&amp;rft_id=http%3A%2F%2Fperldoc.perl.org%2Fperlpod.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-50"><span class="mw-cite-backlink"><b><a href="#cite_ref-50">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://search.cpan.org/~bradapp/PodParser-1.20/lib/Pod/ParseUtils.pm">"Pod::ParseUtils – helpers for POD parsing and conversion"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2011-09-12</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Pod%3A%3AParseUtils+%E2%80%93+helpers+for+POD+parsing+and+conversion&amp;rft_id=http%3A%2F%2Fsearch.cpan.org%2F~bradapp%2FPodParser-1.20%2Flib%2FPod%2FParseUtils.pm&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-perl6-51"><span class="mw-cite-backlink">^ <a href="#cite_ref-perl6_51-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-perl6_51-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.perl6.org/language/syntax#Comments">"Perl 6 Documentation – Syntax (Comments)"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2017-04-06</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Perl+6+Documentation+%E2%80%93+Syntax+%28Comments%29&amp;rft_id=https%3A%2F%2Fdocs.perl6.org%2Flanguage%2Fsyntax%23Comments&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-triple-52"><span class="mw-cite-backlink">^ <a href="#cite_ref-triple_52-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-triple_52-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20210819164828/https://www.tutorialdocs.com/tutorial/python3/python3-basic-syntax.html">"Python 3 Basic Syntax"</a>. Archived from <a rel="nofollow" class="external text" href="https://www.tutorialdocs.com/tutorial/python3/python3-basic-syntax.html">the original</a> on 19 August 2021<span class="reference-accessdate">. Retrieved <span class="nowrap">25 February</span> 2019</span>. <q>Triple quotes are treated as regular strings with the exception that they can span multiple lines. By regular strings I mean that if they are not assigned to a variable they will be immediately garbage collected as soon as that code executes. hence are not ignored by the interpreter in the same way that #a comment is.</q></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Python+3+Basic+Syntax&amp;rft_id=https%3A%2F%2Fwww.tutorialdocs.com%2Ftutorial%2Fpython3%2Fpython3-basic-syntax.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-53"><span class="mw-cite-backlink"><b><a href="#cite_ref-53">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="https://twitter.com/gvanrossum/status/112670605505077248">"Python tip: You can use multi-line strings as multi-line comments"</a>, 11 September 2011, Guido van Rossum</span> </li> <li id="cite_note-MSSQL-54"><span class="mw-cite-backlink"><b><a href="#cite_ref-MSSQL_54-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFTalmage1999" class="citation book cs1">Talmage, Ronald R. (1999). <a rel="nofollow" class="external text" href="https://archive.org/details/microsoftsqlserv00talm"><i>Microsoft SQL Server 7</i></a>. Prima Publishing. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-7615-1389-6" title="Special:BookSources/978-0-7615-1389-6"><bdi>978-0-7615-1389-6</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Microsoft+SQL+Server+7&amp;rft.pub=Prima+Publishing&amp;rft.date=1999&amp;rft.isbn=978-0-7615-1389-6&amp;rft.aulast=Talmage&amp;rft.aufirst=Ronald+R.&amp;rft_id=https%3A%2F%2Farchive.org%2Fdetails%2Fmicrosoftsqlserv00talm&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-MySQL-55"><span class="mw-cite-backlink"><b><a href="#cite_ref-MySQL_55-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://dev.mysql.com/doc/refman/8.0/en/comments.html">"MySQL 8.0 Reference Manual"</a>. Oracle Corporation<span class="reference-accessdate">. Retrieved <span class="nowrap">January 2,</span> 2020</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=MySQL+8.0+Reference+Manual&amp;rft.pub=Oracle+Corporation&amp;rft_id=https%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F8.0%2Fen%2Fcomments.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-SQLite-56"><span class="mw-cite-backlink"><b><a href="#cite_ref-SQLite_56-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.sqlite.org/lang_comment.html">"SQL As Understood By SQLite"</a>. SQLite Consortium<span class="reference-accessdate">. Retrieved <span class="nowrap">January 2,</span> 2020</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=SQL+As+Understood+By+SQLite&amp;rft.pub=SQLite+Consortium&amp;rft_id=https%3A%2F%2Fwww.sqlite.org%2Flang_comment.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-PostgreSQL-57"><span class="mw-cite-backlink"><b><a href="#cite_ref-PostgreSQL_57-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.postgresql.org/docs/10/sql-syntax-lexical.html#SQL-SYNTAX-COMMENTS">"PostgreSQL 10.11 Documentation"</a>. The PostgreSQL Global Development Group<span class="reference-accessdate">. Retrieved <span class="nowrap">January 2,</span> 2020</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=PostgreSQL+10.11+Documentation&amp;rft.pub=The+PostgreSQL+Global+Development+Group&amp;rft_id=https%3A%2F%2Fwww.postgresql.org%2Fdocs%2F10%2Fsql-syntax-lexical.html%23SQL-SYNTAX-COMMENTS&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-Oracle-58"><span class="mw-cite-backlink"><b><a href="#cite_ref-Oracle_58-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.oracle.com/cd/B13789_01/server.101/b10759/sql_elements006.htm">"Oracle® Database SQL Reference"</a>. Oracle Corporation<span class="reference-accessdate">. Retrieved <span class="nowrap">January 2,</span> 2020</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Oracle%C2%AE+Database+SQL+Reference&amp;rft.pub=Oracle+Corporation&amp;rft_id=https%3A%2F%2Fdocs.oracle.com%2Fcd%2FB13789_01%2Fserver.101%2Fb10759%2Fsql_elements006.htm&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> <li id="cite_note-InsecureComments-59"><span class="mw-cite-backlink"><b><a href="#cite_ref-InsecureComments_59-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFAndress2003" class="citation book cs1">Andress, Mandy (2003). <i>Surviving Security: How to Integrate People, Process, and Technology</i>. CRC Press. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-8493-2042-2" title="Special:BookSources/978-0-8493-2042-2"><bdi>978-0-8493-2042-2</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Surviving+Security%3A+How+to+Integrate+People%2C+Process%2C+and+Technology&amp;rft.pub=CRC+Press&amp;rft.date=2003&amp;rft.isbn=978-0-8493-2042-2&amp;rft.aulast=Andress&amp;rft.aufirst=Mandy&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AComment+%28computer+programming%29" class="Z3988"></span></span> </li> </ol></div> <div class="mw-heading mw-heading2"><h2 id="Further_reading">Further reading</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=53" title="Edit section: Further reading"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li>Movshovitz-Attias, Dana and Cohen, William W. (2013) <a rel="nofollow" class="external text" href="https://www.cs.cmu.edu/~dmovshov/papers/dma_acl2013.pdf">Natural Language Models for Predicting Programming Comments</a>. In Association for Computational Linguistics (ACL), 2013.</li></ul> <div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Comment_(computer_programming)&amp;action=edit&amp;section=54" title="Edit section: External links"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a rel="nofollow" class="external text" href="https://web.archive.org/web/20110708033309/http://dkrukovsky.blogspot.com/2005/07/how-to-write-comments.html">How to Write Comments</a> by Denis Krukovsky</li> <li><a rel="nofollow" class="external text" href="https://web.archive.org/web/20070722211609/http://www.ptlogica.com/TwinText/resource/liveuser.pdf">Source Code Documentation as a Live User Manual</a> by PTLogica</li> <li><a rel="nofollow" class="external text" href="https://www.oracle.com/technetwork/java/javase/tech/index-137868.html">How to Write Comments for the Javadoc Tool</a></li></ul> <!-- NewPP limit report Parsed by mw‐api‐ext.codfw.main‐67468f59cb‐mdswh Cached time: 20241127114331 Cache expiry: 2592000 Reduced expiry: false Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 0.629 seconds Real time usage: 0.982 seconds Preprocessor visited node count: 3064/1000000 Post‐expand include size: 70420/2097152 bytes Template argument size: 867/2097152 bytes Highest expansion depth: 16/100 Expensive parser function count: 64/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 221768/5000000 bytes Lua time usage: 0.332/10.000 seconds Lua memory usage: 5695273/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 833.502 1 -total 42.98% 358.234 1 Template:Reflist 24.53% 204.480 26 Template:Cite_book 12.90% 107.490 1 Template:Short_description 10.74% 89.540 23 Template:Cite_web 9.77% 81.412 2 Template:Pagetype 2.92% 24.375 1 Template:For 1.85% 15.460 1 Template:ISBN 1.78% 14.826 4 Template:Main_other 1.53% 12.712 1 Template:SDcat --> <!-- Saved in parser cache with key enwiki:pcache:8592308:|#|:idhash:canonical and timestamp 20241127114331 and revision id 1258397066. Rendering was triggered because: api-parse --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=Comment_(computer_programming)&amp;oldid=1258397066">https://en.wikipedia.org/w/index.php?title=Comment_(computer_programming)&amp;oldid=1258397066</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Help:Category" title="Help:Category">Categories</a>: <ul><li><a href="/wiki/Category:Source_code" title="Category:Source code">Source code</a></li><li><a href="/wiki/Category:Metadata" title="Category:Metadata">Metadata</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Hidden categories: <ul><li><a href="/wiki/Category:Articles_with_short_description" title="Category:Articles with short description">Articles with short description</a></li><li><a href="/wiki/Category:Short_description_is_different_from_Wikidata" title="Category:Short description is different from Wikidata">Short description is different from Wikidata</a></li><li><a href="/wiki/Category:Articles_with_example_code" title="Category:Articles with example code">Articles with example code</a></li><li><a href="/wiki/Category:Articles_with_example_C_code" title="Category:Articles with example C code">Articles with example C code</a></li><li><a href="/wiki/Category:Articles_with_example_Java_code" title="Category:Articles with example Java code">Articles with example Java code</a></li><li><a href="/wiki/Category:Articles_with_example_Perl_code" title="Category:Articles with example Perl code">Articles with example Perl code</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 19 November 2024, at 13:57<span class="anonymous-show">&#160;(UTC)</span>.</li> <li id="footer-info-copyright">Text is available under the <a href="/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License" title="Wikipedia:Text of the Creative Commons Attribution-ShareAlike 4.0 International License">Creative Commons Attribution-ShareAlike 4.0 License</a>; additional terms may apply. By using this site, you agree to the <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use" class="extiw" title="foundation:Special:MyLanguage/Policy:Terms of Use">Terms of Use</a> and <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy" class="extiw" title="foundation:Special:MyLanguage/Policy:Privacy policy">Privacy Policy</a>. Wikipedia® is a registered trademark of the <a rel="nofollow" class="external text" href="https://wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, a non-profit organization.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=Comment_(computer_programming)&amp;mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-cc877b49b-5pvph","wgBackendResponseTime":250,"wgPageParseReport":{"limitreport":{"cputime":"0.629","walltime":"0.982","ppvisitednodes":{"value":3064,"limit":1000000},"postexpandincludesize":{"value":70420,"limit":2097152},"templateargumentsize":{"value":867,"limit":2097152},"expansiondepth":{"value":16,"limit":100},"expensivefunctioncount":{"value":64,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":221768,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 833.502 1 -total"," 42.98% 358.234 1 Template:Reflist"," 24.53% 204.480 26 Template:Cite_book"," 12.90% 107.490 1 Template:Short_description"," 10.74% 89.540 23 Template:Cite_web"," 9.77% 81.412 2 Template:Pagetype"," 2.92% 24.375 1 Template:For"," 1.85% 15.460 1 Template:ISBN"," 1.78% 14.826 4 Template:Main_other"," 1.53% 12.712 1 Template:SDcat"]},"scribunto":{"limitreport-timeusage":{"value":"0.332","limit":"10.000"},"limitreport-memusage":{"value":5695273,"limit":52428800}},"cachereport":{"origin":"mw-api-ext.codfw.main-67468f59cb-mdswh","timestamp":"20241127114331","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Comment (computer programming)","url":"https:\/\/en.wikipedia.org\/wiki\/Comment_(computer_programming)","sameAs":"http:\/\/www.wikidata.org\/entity\/Q1141067","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q1141067","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2006-12-24T14:06:54Z","dateModified":"2024-11-19T13:57:39Z","image":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/7\/75\/CodeCmmt002.svg","headline":"explanatory note in the source code of a computer program skipped during compilation or interpretation"}</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10