Comment (computer programming): Difference between revisions

Content deleted Content added
Include other information: split into clearly defined sections; bit about copyright is metadata (will move there)
add copyright
Line 112:
 
Many IDEs support adding and removing comments with convenient [[user interface]] such as a [[keyboard shortcut]].
 
=== Store metadata ===
Comments can store [[metadata]] about the code. ForCommon example, the code mightmetadata containincludes the name of the original author and subsequent maintainers, dates when first written and modified, link to development and user documentation, and legal information such as [[copyright]] and [[software license]] information.
 
Some [[programming tools]] write metadata into the code as comments.<ref>See e.g., {{cite book |last=Wynne-Powell |first=Rod |year=2008 |title=Mac OS X for Photographers: Optimized Image Workflow for the Mac User |page=243 |publisher=Focal Press |___location=Oxford |isbn=978-0-240-52027-8 |url=https://archive.org/details/macosxforphotogr0000wynn}}</ref> For example, a [[version control]] tool might write metadata such as author, date and version number into each file when it's commited to the repository.<ref>See e.g., {{cite book |last=Berlin |first=Daniel |year=2006 |title=Practical Subversion, Second Edition |page=168 |publisher=APress |___location=Berkeley |isbn=978-1-59059-753-8}}</ref>
 
===Support documentation generation===
Line 167 ⟶ 172:
=== Document development process ===
Sometimes, comments describe development processes related to the code. For example, comments might describe how to [[software build|build]] the code or how to submit changes to the [[software maintainer]].
 
=== Store metadata ===
Comments can store [[metadata]] about the code. For example, the code might contain the name of the original author and subsequent maintainers, dates when first written and modified, link to development and user documentation, and [[software license]] information.
 
Some [[programming tools]] write metadata into the code as comments.<ref>See e.g., {{cite book |last=Wynne-Powell |first=Rod |year=2008 |title=Mac OS X for Photographers: Optimized Image Workflow for the Mac User |page=243 |publisher=Focal Press |___location=Oxford |isbn=978-0-240-52027-8 |url=https://archive.org/details/macosxforphotogr0000wynn}}</ref> For example, a [[version control]] tool might write metadata such as author, date and version number into each file when it's commited to the repository.<ref>See e.g., {{cite book |last=Berlin |first=Daniel |year=2006 |title=Practical Subversion, Second Edition |page=168 |publisher=APress |___location=Berkeley |isbn=978-1-59059-753-8}}</ref>
 
=== Syntax extension ===