Joke Collection Website - Joke collection - How to annotate the code?
How to annotate the code?
Line comments://The following are comments.
Block comment:/* Here is the comment */
Java language (a computer language, especially for creating websites)
Line comments://The following are comments.
Block comment:/* Here is the comment */
Hypertext markup language
Block comments:
Semi-cast steel Cast Semi-Steel
Block comment:/* Here is the comment */
Java Script language
Line comments://The following are comments.
Block comment:/* Here is the comment */
extensible markup language (XML)
Block comments:
computer programming language
Line comments: # The following are comments.
Block comment:''' Here is the comment'''
SQL Server/Oracle PLSQL
Line comments:-The following are comments.
Block comment:/* Here is the comment */
relational database
Line comments:-The following are comments.
Line comments: # The following are comments.
Block comment:/* Here is the comment */
verb
Line comment:' This is a comment.
assembler language
Line comments:; This is a note.
Actual extraction and reporting language
Line comment: # This is a single line comment.
Block comments:
=pod?
This is a note.
= cut
matlab
Line comment:% This is a comment.
Block comments:%% Below are comments%%
Block comments:% {The following comments are%}
R programming language
Line comments: # The following are comments.
Block comment: if(false){ here is the comment}
Extended data:
About annotations in high-level languages:
1, comments are "tips" or "explanations" of the code instead of documents; Comments are mainly used to explain code complexity; Notes should be accurate, easy to understand (unambiguous) and concise; The effective annotation amount in the program must be above 20%. ?
Note: If the code is clear and can be self-annotated, comments are not needed. Too many details are easy to get bored. Remember not to be so profound that others can't understand it without commenting. ?
2. The purpose of comments: to facilitate the maintenance of the code, explain the functions and methods of the code, facilitate readers to read and prevent unnecessary information duplication. ?
3. It is definitely a good habit to annotate the code. It is best to write comments while writing code.
- Related articles
- Sad August, sadness is an unspeakable pain, and I am no longer yours in August.
- A man in Guangdong was caught throwing a billboard from a height after drinking. What are the hazards of throwing objects at high altitude?
- Continue to write composition with accumulated water on the bridge deck
- Why do some people always refuse to surrender after the Three-Road Highlands were breached?
- Long legs and wayward jokes
- Which episodes of Detective Conan contain Agasa Hiroshi's riddles or jokes?
- The teacher hits people.
- I remember I watched a TV series called Strange Stories from a Chinese Studio ( ), I forgot about it.
- What is the relationship between Wu Zhenyu and Anita Yuen?
- Rewrite ancient poetry jokes