Skip to content

Commit 97790e8

Browse files
authored
翻译了02base-02comments
1 parent e21138a commit 97790e8

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

docs/en/02base-02comments

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
lastUpdated: true
3+
---
4+
5+
# Comments
6+
7+
Comment is a kind of text that add in the cod and won’t execute by the compiler. It can use to explain the function, purpose and realization details of the code. In MCFPP, there’re three kinds of comments:single-line comment, block comment and file comment.
8+
9+
## Single-line comment
10+
11+
Single-line comment is a comment that only place in a single line. In MCFPP, single-line comment starts with `#`, until the line ends. Such as:
12+
13+
```mcfpp
14+
#This is a single line
15+
```
16+
17+
## Block comment
18+
19+
Block comment is a comment that can place in many lines. In MCFPP, block comment starts with `##` and ends with `##`. For example:
20+
21+
```mcfpp
22+
##
23+
This
24+
is
25+
a
26+
block
27+
comment
28+
##
29+
```
30+
31+
## File comment
32+
33+
File comment is a special comment, It can be extracted by the compiler to generate documents. In MCFPP, file comment starts with `#{`, ends with `}`. For example:
34+
35+
```mcfpp
36+
#{
37+
This is a file comment
38+
}#
39+
```
40+
41+
File comment can include some special tags, use to tag the content of the comment. Details in the file chapter.

0 commit comments

Comments
 (0)