You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/overview.md
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ nav:
8
8
9
9
# MCFPP Overview
10
10
11
-
Before the start: sentences of mcfpp is end up with semicolon.
11
+
Before the start: statements of mcfpp is end up with semicolon.
12
12
13
13
## Project information file in JSON format<Badgetype="tip">WIP</Badge>
14
14
@@ -43,7 +43,7 @@ Project information file is situated on root of engineering catalogue, As an ent
43
43
44
44
### Variables
45
45
46
-
Declare : `type identifier (= expr)?;`
46
+
Defination : `type identifier (= expr)?;`
47
47
48
48
Such as : `int i = 5 + p;`,`int x,y,z;`
49
49
@@ -76,11 +76,11 @@ During Compiling, If any variable has been defined as literal, like `int i = 5;`
76
76
77
77
- const
78
78
79
-
`const` means a variable is always constant. That is, its value is given during compilation, and never changes. Such as `const int i = 5;`, `i` will be seem as constant during compiling. Constant is always static during compiling, and its value must be clear when we declare it, can't assign after declaring.
79
+
`const` means a variable is always constant. That is, its value is given during compilation, and never changes. Such as `const int i = 5;`, `i` will be seem as constant during compiling. Constant is always static during compiling, and its value must be clear when we define it, can't assign after declaring.
80
80
81
81
- import <Badgetype="warning">Deprecated</Badge>
82
82
83
-
`import` means a variable is import variable, it's value is imported from other place. Such as `import int i;`, `i` will be seen as import variable after compile. Often, variable only can be used after assignment, but if we use `import` modifier, Then variable can be used after declaration without assignment.
83
+
`import` means a variable is import variable, it's value is imported from other place. Such as `import int i;`, `i` will be seen as import variable after compile. Often, variable only can be used after assignment, but if we use `import` modifier, Then variable can be used after defination without assignment.
Each file's namespace can be declared independently
137
+
Each file's namespace can be defined independently
138
138
139
139
```cpp
140
140
namespacexxx;
141
141
```
142
142
143
-
If the file haven't declared a separate namespace, the namespace defaults to the namespace set in the project configuration file.
143
+
If the file haven't define a separate namespace, the namespace defaults to the namespace set in the project configuration file.
144
144
145
145
## Function
146
146
@@ -156,7 +156,7 @@ func test(int i) -> int{
156
156
157
157
```
158
158
159
-
Function's namespace is decided by the file's namespace. If the file haven't declared a separate namespace, the namespace defaults to the namespace set in the project configuration file.
159
+
Function's namespace is decided by the file's namespace. If the file haven't defined a separate namespace, the namespace defaults to the namespace set in the project configuration file.
160
160
161
161
:::tip Tip
162
162
In mcfpp, function name can contains most utf-8 characters, but the compiled mcfunction's name will only contains characters, underline and numbers. The illegal characters will be replaced by `_uxxxx`.
@@ -291,15 +291,15 @@ class Student{
291
291
292
292
### Abstract
293
293
294
-
Add `abstract` keyword before class can declare the class as abstract class. Abstract function can't be instantiate.
294
+
Add `abstract` keyword before class can define the class as abstract class. Abstract function can't be instantiate.
295
295
296
-
Add `abstract` keyword before function can declare the function as abstract function. Abstract function can't include function body.
296
+
Add `abstract` keyword before function can define the function as abstract function. Abstract function can't include function body.
297
297
298
298
### Extension Function
299
299
300
-
Extension Function makes you can "add" function to current types. And don't need to create new derived type, recompile or change original data type by other methods. Extension function declares out of the class, but it also can be called, as other functions in the class.
300
+
Extension Function makes you can "add" function to current types. And don't need to create new derived type, recompile or change original data type by other methods. Extension function defined out of the class, but it also can be called, as other functions in the class.
301
301
302
-
Declares extension function in the form of `Class name.Function name`, for example:
302
+
Define extension function in the form of `Class name.Function name`, for example:
303
303
304
304
```cpp
305
305
namespacetest;
@@ -341,13 +341,13 @@ interface InterfaceName{
341
341
}
342
342
```
343
343
344
-
You can declare abstract function in the interface. Interface can inherit from other interfaces.
344
+
You can define abstract function in the interface. Interface can inherit from other interfaces.
345
345
346
346
## Template <Badgetype="tip">WIP</Badge>
347
347
348
348
Structure is a datatype that totally makes up by score board. So structure only can contain score board, that's `int` type variables as members.
349
349
350
-
When declaring field, we can ignore type ‘int'. Except this, structure is almost the same as class.
350
+
During the defination of field, we can ignore type ‘int'. Except this, structure is almost the same as class.
351
351
352
352
Here's an example of structure:
353
353
@@ -387,9 +387,9 @@ MNI is similar with the JNI in Java, is a kind of programming framework, makes t
387
387
388
388
### native function
389
389
390
-
native can be declared in classes or functions, Used to run a specific Java function when **compiling**.
390
+
native can be defined in classes or functions, Used to run a specific Java function when **compiling**.
0 commit comments